
Link POS Message Specifications
Version 2.4.4
Document Control Version
| Reversion | Date | Changed By | Comment |
|---|---|---|---|
| 1. 0 | 13 July 2020 | Ong-art Pulathane | New Release |
| 1. 1 | 13 May 2022 | Chotrawee Loungwong | Update Spec to support KIOSK - Add 11 Commands to support KIOSK C0 - C3, P1 - P4, D0, D1, E9 - Add 3 Missing Commands from previous document version to Command Table 34, 41, 43 - Add 1 Optional Field 09, BIN / Acquirer for command 20 - Sale - Add 4 Response codes ED, CE, TO, NA |
| 1. 1. 1 | 18 May 2022 | Chotrawee Loungwong | - Add new Field Type AR to support Array. - Change BIN range in command 20 using Field Type AR Instead. - Remove Response Code ED, CE, TO, NA |
| 1. 2 | 04 July 2022 | Chotrawee Loungwong | - Add new Command I1 to support Card Information Inquiry. - Add Remark Text to tell which commands only support in KIOSK mode. - Add Bank ID tables to present the bank as Bank ID. - Add J6, Bank ID to messages below. - Transaction Code = 20 (Sale). - Transaction Code = 26 (Void). - Transaction Code = 41 (Installment). - Transaction Code = 43 (Redemption). - Transaction Code = 50 (Settlements). - Transaction Code = 71 (Transaction Retrieval). - Transaction Code = 72 (Transaction Retrieval). - Transaction Code = 73 (Transaction Retrieval). |
| 1. 3 | 27 Sep 2022 | Ong-art Pulathane | - Add 2 Commands to support KIOSK S1, S2. - Add new Command 27 to support Refund. - Add Interface Integration - Add transaction flow below. - Normal Sale. - Sale QR Code Payment. - Self Service POS Payment. - Sale Payment Selection. - Void Payment. - Refund. - Inquiry Transaction. - Settlement. |
| 1. 4 | 15 Dec 2022 | Ong-art Pulathane | - Add Unique ID to Refund Message. |
| 1.4.1 | 21 Dec 2022 | Ong-art Pulathane | - Add Example Message to Refund. |
| 1.4.2 | 27 Dec 2022 | Ong-art Pulathane | - Changes wording example response messge of Card Information Inquiry. |
| 1.5.0 | 06 Jan 2023 | Suthat Banchong | - Add Response message Transaction Code 34 (Balance Point Inquiry). |
| 1.6.0 | 21 Mar 2023 | Ong-art Pulathane | - Add Message line encryption diagram. - Add Message Key Exchange Transaction Code K1 - Add Example code for Implement message line encryption |
| 1.6.1 | 24 May 2023 | Ong-art Pulathane | - Edit Length of tag D2 to ..20 - Edit length of tag 30 to ..40 |
| 1.7.0 | 14 June 2023 | Chotrawee Loungwong | - Add Payment Indicator to support Uplan, Preauth, Completion and DCC. - Add Payment Indicator Table. - Add Payment Indicator (PI) to Sale (Transaction Code = 20). - Add Currency Code (CY) to Sale (Transaction Code = 20). - Add PI (Payment Indicator) Field to the Field Table. - Add CY (Currency Code) Field to the Field Table. This version is not supported all PI indicates. Please check with the provider which PI already supported when POS want to use the feature. |
| 1.7.1 | 14 Jun 2023 | Ong-art Pulathane | - Replace tag S1,S5 with tag 45 for message Settlement |
| 1.7.2 | 15 Jun 2023 | Ong-art Pulathane | - Add Transaction Code 74 to Retrieve transaction by reference 1 |
| 1.7.3 | 03 July 2023 | Chotrawee Loungwong | - Add 4F (Discount Amount 1) to Field Spec. - Add 4E (Discount Amount 2) to Field Spec. - Add 4A (Net Amount) to Field Spec. - Add 4F, 4E and 4A to Sale response as an optional - Adjust 40 to original amount |
| 1.7.4 | 24 October 2023 | Ong-art Pulathane | - Add Transaction Code I2 - K-CheckID |
| 1.8.0 | 14 November 2023 | A-nusorn Khumpha | - Add Example Message Transaction Code I2 - K-CheckID |
| 1.9.0 | 31 May 2024 | Chotrawee Loungwong | - Add new Field CI, T1, T2, T3, T4, T5 supporting Read Thai ID Card. - Modified Message I1 (Card Information Inquiry) supporting Thai Id with new Field CI in the Request, and T1, T2, T3, T4, T5 in the Response. - Add new CI Table Supporting Thai ID. |
| 2.0.0 | 14 June 2024 | Chotrawee Loungwong | - Fix Image not display - Support Etax a. Add Etax STX as 82. b. Add LLLL in Header to base 16 for etax transaction. c. Add new Transaction Code EA, EB, EC, ED, EF, EH, EI, EJ and EK d. Add new Field TI, ET, EP and EQ e. Add Etax Transaction Flows f. Add Etax Message Specs |
| 2.0.1-UR | 20 June 2024 | Chotrawee Loungwong | - Add ETAX Single Inquiry (EL) Message. - Fix Invalid Example Message Response for EI |
| 2.0.2 | 26 October 2024 | Ong-art Pulathane | - Add Message Transaction Code - TI(Get Terminal Info) |
| 2.1.0 | 02 December 2024 | Chotrawee Loungwong | - Add new Field Data WT (Wallet Payment Type) - Add new Field Data WC (Wallet Credit Card Number) - Add WC, WT in Sale Wallet Response |
| 2.2.0 | 13 December 2024 | Chotrawee Loungwong | - Add new Field Data For DCC (Dynamic Currency Conversion) as follows - G3 : Exchange Rate - G5 : G5 : Currency Rate - G8 : Foreign Amount - PA : Line 1 Slip (Currency Code) - PB : Line 2 Slip (Exchange Rate) - PC : Line 3 Slip (Mark up) - PD : Line 4 Slip (Additional Wording) |
| 2.3.0 | 15 May 2025 | Chotrawee Loungwong | - Add new Format version 2 - Add new Field Data PM (Payload Message) - Add new section explained how Format vesrion 2 works with field data PM respective to Transaction Message section |
| 2.4.0 | 2 Jun 2025 | Ong-art Pulathane | - Add message Inquiry QR(IQ) and Cancel QR(CQ) |
| 2.4.1 | 19 Jul 2025 | Ong-art Pulathane | - Add DCC POS Print Slip Diagram Flow |
| 2.4.2 | 18 Aug 2025 | Ong-art Pulathane | - Add Approval Code, MID, TID, Batch No to Message response Point Redemption - Add Message Transaction Code = SR For Support DCC Sync Conversion Rate |
| 2.4.3 | 1 Nov 2025 | Ong-art Pulathane | - Add S3 for Payment Source of Funds |
| 2.4.4 | 7 Nov 2025 | Ong-art Pulathane | - Add NA(Product Referance Number) and NB(SKU) for TTB |
Interface Integration
Integration via USB/RS232
The USB/RS232 Interface used between the POS and the Terminal is detailed in the following.
- Baud Rate
9600 - Data bit
8 - Stop bit
1 - Parity
None
Integration via TCP Protocal
The TCP Protocal Interface used between the POS as TCP client and the Terminal as TCP Server on Port 4001 is detailed in the following.
Message Line Encryption
If the protocol requires encryption, this guideline must be followed.
The encryption session will utilize Elliptic-curve Diffie-Hellman (ECDH) key agreement for exchanging keys, and then use the derived keys to encrypt messages using the AES algorithm.
Message Encryption Transaction Flow
The message encryption transaction works as follows:
1. Elliptic-curve Diffie-Hellman (ECDH) Protocal
Elliptic-curve Diffie-Hellman (ECDH) is a key agreement protocol that allows two parties to generate a shared secret over an insecure communication channel. It is based on the Diffie-Hellman key exchange protocol, but instead of using a finite field, it operates on elliptic curves.
The ECDH protocol works as follows:
Reference : https://asecuritysite.com/ecdh
2. AES Encryption
- The transformation to be used should be 'AES/GCM/NoPadding'.
- To calculate the initialization vector (IV), perform an XOR operation on the (ECDH) key agreement.
Transaction Flow
Normal Flow
Self Service POS Payment
Sale Payment Selection
Error Handling
1. POS repeat send request.
2. EDC repeat sends the response data to POS.
3. POS repeat send request always not response.
Message Structure
The messages that are transmitted omn the link between the POS and Terminal will use the following structure

| Field | Bytes | Value | Comment |
|---|---|---|---|
| STX | 1 | 02 or 82 | Start of Text This character is used to indicate the start of a frame. For normal Transaction, Start Text must set as 02 For Etax Transaction, Start Text must set as 82 |
| LLLL | 2 | Length of the MESSAGE DATA to follow. This is transmitted in BCD (Binary Coded Decimal) from. The most significant byte is transmitted first, folloeed bt the least significant byte. For example, a length of 256 bytes will be transmited as 0256 The LLLL field allows thr inclusion of binary data in the message. The maximum alwable value for LLL will depend on the implementation. [ETAX] : The Length of ETAX Message will be in base 16 which POS needs to convert to, both request and response. For example, a length of 256 bytes will be convert to base 16 and transmited as 0100. The LLLL field allows thr inclusion of binary data in the message. The maximum alwable value for LLL will depend on the implementation. |
|
| MESSAGE DATA | Variable | The message data consist of a Transport Header, a Presentation Header, and Field Data which os one or more Field Elements. | |
| ETX | 1 | 03h | End of Text Logically this field is not required because of the length indicator (LLLL), but it is included as an extra check that the message was successfully received and that the receiver is in synchronization with the transmitted message. |
| LRC | 1 | Longitudinal Redundancy Character. This character is calculated by Exclusive OR-ing each character following (but not including) the STX up to(and including) the ETX. | |
MESSAGE DATA
The message data within a message consists of three different components, in the order as shown in the following diagram.
The different components are detailed in the sections that follow this one.

Transport Header
The first data in the Message Data is the Transport Header. The Transport Header provides flexibility in message routing, and allows more than one application to use the same network.
The fields comprising the Transport Header are arranged in the following order.

The fields are described below.
| Field | Bytes | Value | Use | |
|---|---|---|---|---|
| Transport Header Type | 2 | 60 | Used to select the type of application this message is used for. A value of '60' defines an Application Message | |
| Transport Destination | 4 | 0000 | Allows the POS to select the destination to which this message is to be routed. If this value is '0000', the Terminal will determine the correct destination to route the message to from its internal tables. | |
| Transport Source | 4 | 0000 | The first two digits of this field must be '00'. The second two digits can be used by the POS for any purpose. Typically this will be '00', but if there are multiple devices connected to the POS, this field can be used to identify the device the original request originated at. |
Presentation Header
The next data in the Message Data is the Presentation Header. The Presentation Header indicates if this is a request or a response, the transaction code, a response code, and an indication if there are more messages associated with this message.

The fields are described below.
| Field | Bytes | Value | Use | ||
|---|---|---|---|---|---|
| Format Version | 1 | 1 or 2 | Indicates what format of the messages is supported. * In this document vesion, only Self Checkout Payment (KIOSK) with TCP/IP connectivity require format version 2 |
||
| Request-Response Indicator | 1 | '0' This message is a request message which requires a response '1' This message is a response message '2' This message is a request message which does not require a response |
|||
| Transaction Code | 2 | Identifies the type of transaction this message is performing. See the table in section for a list of valid Transaction Codes. | |||
| Response code | 2 | Identifies the result of the transaction in a response. Response code should be set to '00' for all request messages. See the table in section for a list of valid Response Codes. |
|||
| More Indicator | 1 | '0' This is the last message for this transaction. '1' There is another message following this one with more field data for this transaction. |
|||
| Field Separator | 1 | 1Ch | This field is used to make it easier to identify the end of the presentation header when looking at message traces. |
Field Data
The Field Data is the most important area for flexibility in the message format.
The method described here allows great benefits, but there is a price to pay for this flexibility; each field element has 2 or 5 bytes of overhead.
The benefits gained from this overhead are:
- Ability to pass binary data
New features such as Signature Capture will require passing large amounts of data. The overhead required if this cannot be passed as binary data is very high.
- Variable Length Data Fields.
- The data is fairly readable on a message trace.
The Field Data consists of 0 or more Field Elements, arranged one after the other in the message.

Field Data Format
The fields comprising the Field Element are arranged in the following order.

The fields are described below
| Field | Bytes | Value | Use | |
|---|---|---|---|---|
| Field Type | 2 | Indicates the type of data that is included in this field element. This is an alphanumeric field. Characters 0-9 and AZ are available for use. The table in section lists the available values. | ||
| LLLL | 2 | Indicates the length in bytes of the data to follow. Length can have a value from 0000 to a value that will not cause the total message to exceed the maximum size allowed for the implementation. Available values for this are detailed in section. LLLL is transmitted in BCD (Binary Coded Decimal) form. The most significant byte is transmitted first, followed by the least significant byte. For example, a length of 256 bytes will be transmitted as 02h 56h. [ETAX] : The Length of ETAX Message will be in base 16 which POS needs to convert to, both request and response. For example, a length of 256 bytes will be convert to base 16 and transmited as 0100. |
||
| Data | LLLL | The data for this field. If no data is in this field (for example, when the functionality is indicated by the field type on its own), there will be no data. | ||
| Field Separator | 1 | 1Ch | This field is used to make it easier to identify the end of a field element when looking at message traces. |
Extra Field Separators
Some POS implementations will be easier to develop this interface if field data appears in a particular order, with additional field separators to represent fields that are missing.
To support this, it is acceptable to include extra Field Separator characters (1Ch) between Field Elements.
This can be easily supported in the parsing routine by ignoring any Field Separator characters when it is expecting the first character of the Field Type.
TRANSACTION CODES
- Each transaction code is identified with a two character code. Characters 0-9, and A-Z are available for use in the Transaction Code.
| Transaction Code | Description |
|---|---|
| 20 | Sale |
| 70 | Sale Alipay/Wechat/QR Payment/Other wallet Transaction |
| 26 | Void |
| 27 | Refund |
| 34 | Balance inquiry |
| 41 | Installment |
| 43 | Redemption |
| 50 | Settlement |
| 71 | Retrieve transaction by trace number |
| 72, 74 | Retrieve transaction by reference 1 |
| 73 | Retrieve transaction by Unique ID |
| C0 | Waiting card insert |
| C1 | Chip card inserted |
| C2 | Waiting card remove |
| C3 | Chip card removed |
| P1 | Waiting PIN entry |
| P2 | PIN entry finished |
| P3 | PIN timeout |
| P4 | PIN cancel |
| D0 | Communication test |
| D1 | Communication cancel |
| I1 | Card Information Inquiry |
| I2 | K-CheckID |
| 27 | Refund |
| S1 | Waiting for Signature |
| S2 | Signature Captured |
| EA | Sale Credit + Etax |
| EB | Sale Wallet + Etax |
| EC | Redeem + Etax |
| ED | Installment + Etax |
| EF | Void + Etax |
| EH | Etax Create |
| EI | Etax Void |
| EJ | Etax Inquiry |
| EK | Etax Settlement |
| EL | Etax Inquiry (Single Transaction) |
| IQ | Inquiry QR Payment |
| CQ | Cancle QR Payment |
| SR | DCC Sync Conversion Rate |
FILED TYPES
- Each different type of Field Element within the Field Data is designated by a different Field Type value. Each Field Type also has an attribute and a length associated with it. The length may be a single number, which indicates a fixed length field, or a variable length which indicates a maximum length. Variable length fields are indicated by two dots preceding the length. **For example, **
Track 1 data is a variable length field up to 76 characters long, which has a length description of ..76. - Field Types are alphanumeric, meaning 0-9 and A-Z are valid characters in the Field Type.
Field Attributes
The following table lists the different field attributes available for use in the Field Type Definition Table.
Attribute Description
| Attribute | Description |
|---|---|
| ANS | Alpha, Numeric and Special characters |
| AN | Alpha and Numeric character |
| N | Numeric characters |
| Z | Numeric Data plus '=' character This is used for Track 2 data, where the '=' is the separator between the card number and the rest of the data. |
| $ | Amount. Numeric characters indicating number of cents. No $ sign or decimal point is included. |
| B | Binary Data The data is a stream of bytes that could take any value. |
| T | Telephone Number Data Valid characters are 0-9, *, #, space, -, and a comma or a P for a dial tone pause. |
Field Type Definition
The following table lists the defined field type definitions with their attributes, and the lengths of each field.
| Field Type | Attribute | Length | Field Data | |
|---|---|---|---|---|
| 01 | ANS | 6 | Approval Code | |
| 02 | ANS | 40 | Response Text 40 character text is arranged as two lines of 20 characters | |
| 03 | N | 6 | Transaction Date YYMMDD |
|
| 04 | N | 6 | Transaction Time HHMMSS |
|
| 06 | N | 12 | Merchant Number | |
| 07 | N | 4 | Store Number | |
| 08 | N | 4 | Terminal Number | |
| 09 | N | 6 | BIN, Acquirer | |
| 10 | N | 6 | Agent Number | |
| 11 | N | 6 | Chain Number | |
| 12 | ANS | 25 | Merchant Name | |
| 13 | ANS | 13 | Merchant City | |
| 14 | ANS | 2 | Merchant State | |
| 15 | ANS | 4 | Merchant Location Number | |
| 16 | N | 8 | Terminal Identification Number | |
| 17 | N | 1 | Cardholder ID Code | |
| 20 | ANS | . . 9999 | Print Data Formatted Actual maximum length is determined by the application. | |
| 30 | N | . . 40 | Primary Account Number | |
| 31 | N | 4 | Expiration Date YYMM |
|
| 32 | ANS | . . 76 | Track 1 data Start and end sentinels and LRC are not included. | |
| 33 | Z | . . 36 | Track 2 data Start and end sentinels and LRC are not included. | |
| 34 | ANS | 1 | Account Data Source 'D' Mag-stripe-read, Track 2 capable 'H' Mag-stripe-read, Track 1 capable 'T' Manual key entered, Track 2 capable 'X' Manual key entered, Track capable '@' Manual key entered, not capable or reading card data |
|
| 40 | $ | 12 | Amount, Transaction amount which is considered to Original Amount | |
| 41 | $ | 12 | Amount, Tip Information only amount field. | |
| 42 | $ | 12 | Amount, Cash Back Information only amount field. | |
| 43 | $ | 12 | Amount, Tax Information only amount field. | |
| 4A | $ | 12 | Net Amount, Transaction This is the total amount of the transaction. Any other amounts (such as Tip, Cash Back, Taxes, Discount, etc.) are included in this amount. | |
| 4F | $ | 12 | Discount Amount 1 | |
| 4E | $ | 12 | Discount Amount 2 | |
| 50 | N | 6 | Batch Number | |
| 51 | N | 4 | Batch Transmission Date MMDD |
|
| 52 | $ | 16 | Batch Amount Hashing Total | |
| 53 | N | 9 | Batch Transaction Record Count | |
| 54 | ANS | 30 | Batch Response Message | |
| 60 | T | . . 24 | Primary Telephone Number | |
| 61 | T | . . 24 | Secondary Telephone Number | |
| 62 | AN | 1 | Dial Type '0' DTMF/Tone Dialing '1' Pulse Dialing | |
| 63 | T | . . 8 | PABX/Tie Line Access Code | |
| 64 | N | 2 | Modem mode for dial '00' 1200 bps '08' 2400 bps |
|
| 65 | ANS | 6 | Invoice Number Used to identify a transaction. There can only be one transaction with a particular value in the batch in the Terminal. |
|
| 66 | ANS | 1 | Card Range Selector This field can be included if it is not possible to use the PAN to determine the Card Range 'P' Private Label Cards, not require if card range are different. ‘C’ CUP transaction ‘I’ Installment transaction ‘F’ FCC transaction. |
|
| 67 | ANS | . . 6 | Employee Number | |
| 68 | ANS | 2, 23, 43, or49 | Cardholder Identification Data Refer to Visa Point-Of-Sale Equipment Requirements, PIN Processing and Data Authentication. |
|
| 69 | ANS | . . 24 | Customer Data, Check Acceptance ID | |
| 70 | N | 3 to 6 | Date Data | |
| 71 | N | . . 4 | Hold Time Number of seconds to hold the dial line open after a transaction. '0000' drops the immediately. '9999' holds the line open indefinitely |
|
| 72 | B | . . 9999 | Transparent Data Actual maximum length is determined by the application. |
|
| 73 | ANS | 7 | Automation ID For Shell Thai software sales slip print out. |
|
| 74 | ANS | 1 | Acquirer Number For Esso Thai software to select the acquirer host |
|
| 75 | ANS | 6 | Security code ( CVV2 / 4DBC) Right space, left justify | |
| 76 | B | 54(Byte) | Magneprint Data | |
| CUSTOMER DEFINED FIELDS | ||||
| 91 | N | 8 | BOCM Posting date YYYYMMDD | |
| 92 | ANS | 3 | BOCM Currency “HKD” or “MOP” | |
| 93 | N | 6 | BOCM Invoice Number | |
| 94 | N | 6 | BOCM Card BIN | |
| HYPERCOM DEFINED FIELDS | ||||
| D0 | ANS | 69 | Merchant Name and Address Organized as 3 lines of 23 characters | |
| D1 | ANS | 15 | ISO8583 Merchant Number | |
| D2 | ANS | . . 20 | Crad Issuer Name Name of the Issuer of the card |
|
| D3 | ANS | 13 | Retrieval Reference Number | |
| D4 | N | 2 | Card Issuer ID = From Initialazation Tables | |
| D5 | ANS | 26 | Card Holder Name | |
| D6 | ANS | . . 12 | Generic Data | |
| D7 | ANS | . . 24 | Generiv Data2 | |
| D9 | N | 6 | STAN | |
| E1 | N | 3 | EPSCO account indicator | |
| E2 | N | 6 | EPSCO ISN | |
| E3 | ANS | 14 | EPSCO account number (masked) | |
| E4 | N | 4 | EPSCO value day (DDMM) | |
| E5 | ANS | 14 | EPSCO response code | |
| E6 | ANS | 120 | Merchant Name and Address Organized as 3 lines of 40 characters | |
| E7 | ANS | 20 | EPSCO Additional Response Text | |
| ED | N | 1 | Clear Reversal, Batch, Mermory |
|
| EF | ANS | 16 | EMV - Application ID | |
| EG | ANS | 16 | EMV - Application Name | |
| EH | ANS | 16 | EMV - Application Cryptogram | |
| EJ | ANS | 10 | EMV - Terminal Verification Result | |
| EK | ANS | 1 | POS Entry mode |
|
| F1 | ANS | 2 | Neptune- Type Code | |
| F2 | N | 4 | Cashier ID | |
| F3 | N | 4 | Neptune-Redemption loyalty profile ID | |
| F4 | N | 12 | Neptune- Point Balance | |
| F5 | N | 8 | Neptune- Expire date for last point pool YYYYMMDD | |
| F6 | N | 12 | Neptune- Last point pool total | |
| F7 | N | 12 | Neptune- Bonus point redeemed | |
| F8 | N | 12 | Neptune- Remain amount need to pay | |
| F9 | N | 12 | Neptune- Bonus point awarded | |
| FA | N | 12 | Neptune- Hong Kong dollars amount | |
| FB | ANS | 20 | Neptune- ECR Invoice number | |
| G1 | N | 12 | DCC - Amount in cents | |
| G2 | N | 12 | DCC - TIPS Amount in cents | |
| G3 | N | 8 | Respond when DCC Transaction performed. DCC - Exchange rate |
|
| G4 | ANS | 3 | DCC - Local Currency name e. g. "HKD" | |
| G5 | ANS | 3 | Respond when DCC Transaction performed. DCC - Foreign Currency name e. g. "USD" |
|
| G6 | ANS | 1 | DCC - Exchange Rate Format |
|
| G7 | ANS | 1 | DCC - OPTION "Y" or "N" | |
| G8 | N | 12 | Respond when DCC Transaction performed. Amount Paid in Foreign Currency, format xxxxxxxxxxxx where last 2 digits is decimal Example : 000000000100 = 1.00 |
|
| GA | N | 12 | Install – Monthly Amount in cents | |
| GB | ANS | 3 | Install – Installment Plan e. g. “012” | |
| GC | ANS | 50 | FCC/DCC DE63 request messageProduct Code “DCC1”Table length “0x00 0x46”Table ID “83”Amt in local “999999999999”Pay flag “0”, ”1”, ”2”Curr String “AAA”Exchange Rate “99999999” Amt in Fotrign “999999999999” Local Cur Acq TID “99999999” | |
| DG | ANS | . . 999 | FCC/DCC DE63 response message | |
| HN | N | 3 | NII | |
| HO | N | 96 | Batch Totals |
|
| HP | N | 1 | Printing Status, Enable Flag |
|
| J1 | ANS | 2 | AXS Status |
|
| J2 | ANS | 20 | Primary IPFormat as “10. 250. 4. 5 :1517”IP address = 10. 250. 4. 5Port = 1517 | |
| J3 | ANS | 20 | Secondary IPFormat as “10. 250. 4. 5 :1517”IP address = 10. 250. 4. 5Port = 1517 | |
| J4 | ANS | 15 | Terminal Software Version | |
| J5 | ANS | 1 | Transaction type – refer to EFT spec. | |
| J6 | ANS | 2 | Bank ID | |
| J7 | ANS | 1 | Prompt Supervisor Card – Y, if need to prompt for Supervisor Card. | |
| J8 | ANS | 8 | Account Type “DEFAULT”, ”CURRENT”, “SAVINGS”, “CREDIT” | |
| J9 | N | 2 | Button Status |
|
| JA | ANS | 25 | AXS Process |
|
| K1 | ANS | 3 | CUP Operator No | |
| K2 | ANS | 11 | CUP Issuer No | |
| K3 | ANS | 11 | CUP Acquier No | |
| K4 | ANS | 6 | CUP Origional Auth No. | |
| K5 | ANS | 6 | CUP Origional Trace No. | |
| K6 | N | 64 | CUP Batch Totals |
|
| S1 | ANS | 2 | Product Code 1 ( for Shell Transaction ) | |
| S2 | $ | 12 | Litre – No. of litre of Product Code 1 ( for Shell ) | |
| S3 | ANS | 2 | Product Code 2 ( for Shell Transaction ) | |
| S4 | $ | 12 | Amount #2 – Amount for product code 2 ( for Shell ) | |
| S5 | N | 1 | Merchant ID (for Multi-Merchant feature in Thailand) | |
| AR | ANS | ..999 | Array Data separated each element using simple pipe ('\ |
')or specific as 0x7C |
| PI | ANS | 2 | Payment Indicator | |
| PL | ANS | 2 | K-CheckID Data Payload | |
| CY | N | 3 | Currency Code (ISO 4217). | |
| CI | N | 3 | Card Type Identifier | |
| T1 | N | 13-19 | Thai Personal ID | |
| T2 | ANS | ..255 | Personal Name (TH) | |
| T3 | ANS | ..255 | Personal Name (EN) | |
| T4 | ANS | ..255 | Date of Birth | |
| T5 | ANS | ..255 | Personal Address | |
| TI | ANS | ..32 | Tax Invoice Number | |
| ET | ANS | ..65535 | ETAX Data Block, Refer to ETAX specification | |
| EP | ANS | 11 | Total Etax Transactions. Including 3 type, - Total Etax Transaction - Total Success - Total Failed. Each type has 3 digits padding with 0 and separated with | ("Simple pipe", 7C) |
|
| EQ | ANS | ..65535 | Etax Transaction Status. Each Transaction has include 3 Elements, - Transaction Unique ID (U1) - Document Type - Status (PENDING, SUCCESS or NOT_SUCCESS) Each Element has variable length and separate with , ("Comma", 2C) Each Transactions has variable length and separate with | ("Simple pipe", 7C) |
|
| WT | N | 2 | Wallet Payment Type When QR Combined is implemented and applicable, this Field indicates which Type of Payment for the transaction 03 = Thai QR Payment 04 = QR Credit Card |
|
| WC | N | ..19 | Wallet Credit Card Number When QR Combined is implemented and applicable, this Field indicates the Credit card number with maked when the transaction made by QR Credit Card (WT = 04) |
|
| PA | N | ..50 | Respond when DCC Transaction performed. Line 1 Slip, Currency Code needed print on slip Example : CURRENCY CODE 840 |
|
| PB | N | ..50 | Respond when DCC Transaction performed. Line 2 Slip, Exchange Rate needed print on slip Example : Ex. Rate (Included Mark up): USD 1 = 33.3333 |
|
| PC | N | ..50 | Respond when DCC Transaction performed. Line 3 Slip, Mark Up needed print on slip Example : MARK-UP : 5.00% |
|
| PD | N | ..255 | Respond when DCC Transaction performed. Line 4 Slip, Additional Data needed print on slip Example : I HAVE CHOSEN NOT TO USE THE MASTERCARD CURRENCY CONVERSION METHOD AND I WILL HAVE NO RECOURSE AGAINST MASTERCARD CONCERNING THE CURRENCY CONVERSION OR ITS DISCLOSURE |
|
| PM | Ans | ..9999 | The v1 Paylaod Message (Full message including all headers and trailers) in encrypted form if the connectivity is TCIP/IP | |
| PN | ANS | 2 | POS Response The Result DCC Conversion Rate Possible Value: 01 = Selected Local Rate(THB) 02 = Selected Foreign Rate 03 = User Cancel 04 = POS Timeout 05 = Error Unifiled |
WALLET Field Type Definitions
| Field Type | Attribute | Length | Field Data |
|---|---|---|---|
| A1 | Ans | 2 | “01” if Alipay“02” if Wechat“03” if QR Payment“04” if QR Credit“30” if Dolfin wallet“99” if Other Wallet |
Bank ID
The following table lists the identities of the banks in case of ECR client wants to do cross-bank transaction. The Bank ID will be present for every message in optional when ECR want to process for the specific bank, or can be absent if multiple bank application installed and wants EDC to launch the payment screen and manual selection by POS Staffs.
Bank IDs
| ID | Refers to Bank |
|---|---|
| 01 | Bank of Thailand (BOT) |
| 02 | Bangkok Bank Public Complany Limited (BBL) |
| 04 | Kasikorn Bank Company Limited |
| 06 | Krung Thai Bank Public Company Limited (KTB) |
| 11 | TMB Bank Public Company Limited ( TMB) |
| 14 | Siam Commercial Bank Public Company Limited (SCB) |
| 24 | United Overseas Bank (Thai) PCL (UOBT) |
| 25 | Bank of Ayudhya Public Company Limited (BAY) |
| 30 | Government Saving Bank (GOV) |
| 31 | Hong Kong & Shanghai Corporation Limited Hong Kong & Shanghai Corporation Limited (HSBC) |
| 32 | Deutsche Bank, Deutsche Bank Aktiengesellschaft (DEUTSCHE) |
| 33 | Government Housing Bank (GHB) |
| 34 | BANK FOR AGRICULTURE AND AGRICULTURAL COOPERATIVES |
| 39 | Mizuho Bank Bangkok Branch (MHCB) |
| 907 | AEON THANA SINSAP (THAILAND) PUBLIC COMPANY LIMITED(AEON) |
| 00 | Undefined, if this value presents, EDC will threat as no Bank selection and will prompt / Auto select the bank according to the card inserted / bank selection in EDC Screen |
- Please note that not all Bank ID is supported and some of supported Bank may not appeared in specs. POS engineer need to confirm the bank id with Main Acquirer if POS need to use this field.
Payment Indicator (PI)
The Payment Indicator used to indicates payment method which allows POS select transaction type by theirself. POS is possibly sent this field when do Sale (Transaction code = 20) to indicate which type of payment supported by terminal POS need to do.
Indicators
| ID | Refers to Payment Method |
|---|---|
| 00 or absent | Card Type, Full Payment |
| 01 | Card Type, Uplan |
| 02 | Card Type, Pre-authorization |
| 03 | Card Type, Completion |
| 04 | Card Type, DCC |
- Please note that not all Bank ID is supported and some of supported Bank may not appeared in specs. POS engineer need to confirm the bank id with Main Acquirer if POS need to use this field.
Card Type Indicator (CI)
The Card Type Indicator used to indicates the Card POS need to inquire the information from. POS is possibly sent this field when do Card Information Inquiry (Transaction Code = I1) or leave it absent if the card type which POS need to inquire is credit card.
Indicators
| ID | Refers to Card Type |
|---|---|
| 00 or absent | Credit Card |
| 01 | Thai ID Card |
RESPONSE CODES
The following table lists the response codes that the Terminal will send back to the POS in a response message.
| Response Code | Meaning |
|---|---|
| 00 | Approved Transaction is approved by ECR / host |
| ND | Declined The transaction is declined. More explanation is included in the response text filed. If any activity is time out, EDC will sends only ND to POS |
| NB | No Batch The batch is empty when doing settlement. |
Transaction Message
1. Sale(Transaction code - 20)
For DCC Transaction Flow
This transaction will be performed only when
- The Presentation Header Format Version is set to 2.
- The PI(Payment Indicator) is to set 04 to enable DCC Transaction flows
- The PO(Need DCC Sync Conversion Rate) field is enabled with a value of 1
When Your POS Need to enable the DCC Sync. Please focus with Transaction Code = SR
Tabular Format
| Transaction Type | Condition / Field | Value | Description |
|---|---|---|---|
| DCC Sale Request | Presentation Header Format Version | 2 | The required format version for all DCC transactions. |
| PI (Payment Indicator) | 04 | Enables the DCC transaction flow. | |
| PO (Need DCC Sync Conversion Rate) | 1 | Conditional: Required if the customer must choose their currency on the POS. | |
| DCC Synchronization | Transaction Code | SR | A separate, dedicated command for enabling or performing a DCC rate sync. |
For transactions where the customer opts for a foreign exchange rate, the Point-of-Sale (POS) system will receive from EDC for print Dynamic Currency Conversion (DCC) data on the receipt. If the customer chooses the THB rate, no DCC data will be sent to the POS. Please see the diagram flow below.
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example | |
|---|---|---|---|---|---|
| 40 | ANS | 12 | Amount Transaction | Ex. 000000001000 = 10. 00 | |
| R1 | ANS | 20 | **Optional Reference 1 |
||
| R2 | ANS | 20 | **Optional Reference 2 |
||
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
|
| RESERVED FOR VAT REFUND | |||||
| V1 | ANS | 10 | VAT Amount | **Optional Ex. 000000001000 = 10. 00 |
|
| V2 | ANS | 10 | Tax Allowance | **Optional Ex. 000000002000 = 20. 00 |
|
| V3 | ANS | 20 | Merchant Unique Value | **Optional |
|
| V4 | ANS | 6 | Campaign Type | **Optional |
|
| AR | ANS | ..999 | BIN Range (Array) | **Optional Use for checking if this field present, the input PAN will be validated if the BIN of PAN contains the BIN range sent |
|
| J6 | ANS | 2 | Bank ID | ** Optional, if value is presented and not be 00, EDC will prompt for the selected bank 04 |
|
| PI | ANS | 2 | Payment Indicator | **Optional Payment method indicates to be proceed. |
|
| PO | ANS | 1 | Need DCC Sync Conversion | **Optional Payment method indicates to be proceed. Possible Value: 0 = Disble Default 1 = Enable |
Example Request : 02003536303030303030303030313032303030311C343000123030303030303030303130301C0315
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example | |
|---|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | ||
| D0 | ANS | 96 | Merchant Name and Address | ||
| 03 | N | 6 | Transaction Data(YYMMDD) | ||
| 04 | N | 6 | Transaction Time(HHMMSS) | ||
| 01 | ANS | 6 | Approval Code | ||
| 65 | ANS | 6 | Invoice No. (Trace No. ) | ||
| 16 | N | 8 | Terminal ID | ||
| D1 | ANS | 15 | Merchant ID | ||
| D2 | ANS | . . 20 | Card Issuer Name | ||
| 30 | N | . . 40 | Primary Account Number (Card Number) If the payment proceeded by QR, this field may replaced with trans id (maximum 40 chars) instead of card number |
||
| 31 | N | 4 | Card Expiry Date(YYMM) | ||
| 50 | N | 6 | Batch No. | ||
| D3 | ANS | 12 | Reference No. | ||
| 40 | ANS | 12 | Transaction Amount (Original) | ||
| D5 | ANS | 26 | Card Holder Name | ||
| R1 | ANS | 20 | **Optional Reference 1 |
||
| R2 | ANS | 20 | **Optional Reference 2 |
||
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
|
| J6 | ANS | 2 | Bank ID | **Optional Returns the bank that belongs to the proceed transaction 04 |
|
| PI | ANS | 2 | Payment Indicator | **Optional Payment method proceeded, may absent if request is absent and was indicated to full payment |
|
| 4F | N | 12 | Discount Amount 1 | ** Optional PI = 01, this field indicates to UPlan discount amount. Only response when PI is presented |
|
| 4E | N | 12 | Discount Amount 2 | ** Optional PI = 00 or 01, this field indicates to Instant discount amount. Only response when PI is presented |
|
| 4A | N | 12 | Net Amount | ** Optional Only response when PI is presented |
|
| CY | N | 3 | Currency Code | **Optional If payment indicator is presented, the value of the field will be the currency of the Transaction Amount (Net). Please refer to ISO 4217 Only response when PI is presented |
|
| G3 | AN | 8 | Exchange Rate | **Optional Respond when DCC Transaction Performed | |
| G5 | AN | 3 | Currency Code | **Optional Respond when DCC Transaction Performed | |
| G8 | N | 12 | Foreign Amount | **Optional Respond when DCC Transaction Performed | |
| PA | ANS | ..50 | Line 1 Slip | **Optional Respond when DCC Transaction Performed | |
| PB | ANS | ..50 | Line 2 Slip | **Optional Respond when DCC Transaction Performed | |
| PC | ANS | ..50 | Line 3 Slip | **Optional Respond when DCC Transaction Performed | |
| PD | ANS | ..255 | Line 4 Slip | **Optional Respond when DCC Transaction Performed |
Example Response Success : 02042536303030303030303030313132303030311C30320040535543434553532020202020202020202020202054455354204C494E4520322020202020202020201C4430006942616E676B6F6B2020202020202020202020202020202054455354204C494E45203220202020202020202020202054455354204C494E4520332020202020202020202020201C303300063232303932361C303400063231303332331C303100063030303030301C363500063030303031301C3136000831323334353637381C443100153132333435363738393031323334351C44320010564953412020202020201C3330005631323334353637383930313233343132333435363738393031323334313233343536373839303132333431323334353637383930313233341C33310004303232301C353000063130202020201C443300123130303020202020202020201C343000123030303030303030313030301C443500264A6F686E20446F652020202020202020202020202020202020201C5231002031323334353637383930202020202020202020201C5232002031323334352020202020202020202020202020201C037A
Example Response Unsuccessful : 02006336303030303030303030313132304E44311C30320040486F73742052656A65637465642020202020202020202020202020202020202020202020202020201C0313
1.1. DCC Sync Conversion Rate (Transaction Code - SR)
This transaction will be performed only when the Sale Request has a Transaction Code of 20 and the PO field is enabled with a value of 1.
The DCC Sync Conversion Rate process is automatically initiated by the POS system when these two conditions are met.
EDC Sends Back to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Description | Example |
|---|---|---|---|---|---|
| G3 | ANS | ..8 | Exchange Rate | Optional field for provider identification | |
| G5 | ANS | 3 | Foreign Currency Code | Optional field for merchant identification | |
| G8 | N | 12 | Foreign Amount | Optional field for shop identification | |
| 40 | N | 12 | Local Amount(THB) | ||
| PC | ANS | ...50 | Mark-up needed displayed on the slip | MARK-UP : 5.00% |
POS Sends Response to EDC (POS -> EDC)
| Field Type | Attribute | Length | Data | Description | Example |
|---|---|---|---|---|---|
| PN | ANS | 2 | POS select DCC conversion rate result | Possible Value is 01 = Selected Local Rate(THB) 02 = Selected Foreign Rate 03 = User Cancel 04 = POS Timeout 05 = Error Unifiled |
2. Void(Transaction code - 26)
Transaction Flow
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
| J6 | ANS | 2 | Bank ID | ** Optional, if value is presented and not be 00, EDC will prompt for the selected bank 04 |
Example Request : 02002936303030303030303030313032363030311C363500063030303032351C031A
EDC sends data to POS(EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 69 | Merchant Name and Address | |
| 03 | N | 6 | Transactoion Date(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| 01 | ANS | 6 | Approval Code | |
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| D2 | ANS | . . 20 | Card Issuer Name | |
| 30 | N | . . 40 | Primary Account Number(Card Number) | |
| 31 | N | 4 | Card Expiry Date(YYMM) | |
| 50 | N | 6 | Batch No. | |
| D3 | ANS | Reference No. | ||
| D5 | ANS | 26 | Card Holder Name | |
| R1 | ANS | 20 | Reference 1 | |
| R2 | ANS | 20 | Reference 2 | |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
| J6 | ANS | 2 | Bank ID | Returns the bank that belongs to the proceed transaction 04 |
Example Response Success :
02039136303030303030303030313132363030311C30320040535543434553532020202020202020202020202020202020202020202020202020202020202020201C4430006942616E676B6F6B20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020201C303300063232303932361C303400063231313734341C303100063030303030301C363500063030303031301C3136000831323334353620201C443100153132333435363738393031323334351C443200104150504C4520202020201C3330001431323334353637383930313233341C33310004303232301C353000063130202020201C443300123130303020202020202020201C443500264A6F686E20446F652020202020202020202020202020202020201C5231002031323334353637383930202020202020202020201C5232002031323334352020202020202020202020202020201C5531002031313131313131312020202020202020202020201C03BE
Example Response Unsuccessful : 02006336303030303030303030313132304E44311C30320040486F73742052656A65637465642020202020202020202020202020202020202020202020202020201C0313
3. Settlement 1 Host(Teansaction Code = 50)
Transaction Flow
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| HN | N | 3 | NII | 120 = CREDIT HOST 125 = UNIONPAY HOST 003 = AMEX 128 = AliPay/WeChat 130 = QR Payment |
| 45 | N | 1 | Merchant Number (ForMultiMerchant) | 1 = Merchant No. 1 2 = Merchant No. 2 |
| J6 | ANS | 2 | Bank ID | ** Optional, if value is presented and not be 00, EDC will prompt for the selected bank If value = 00, all banks supported will be selected 04 |
Example Request : 02003236303030303030303030313035303030311C484E00033132301C53350001311C037E
EDC sends data to POS(EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 69 | Merchant Name and Address | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| 50 | N | 6 | Batch No. | |
| 03 | N | 6 | Transactoion Date(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| HO | N | 90 | Batch Total | Batch Total Capture Sale Count 4 Capture Sale Amount 12 Capture Refund Count 4 Capture Refund Amount 12 Debit Sale Count 4 Debit Sale Amount 12 Debit Refund Count 4 Debit Refund Amount 12 Authorize Sale Count 4 Authorize Sale Amount 12 Authorize Refund Count 4 Authorize Refund Amount 12 |
| HN | N | 3 | NII | 120 = CREDIT HOST 125 = UNIONPAY HOST 003 = AMEX 128 = AliPay/WeChat 130 = QR Payment |
| J6 | ANS | 2 | Bank ID | Returns the bank that belongs to the proceed transaction. If all bank selected, the response value will be 00 04 |
Example Response Success :
02031236303030303030303030313135303030311C30320040535543434553532020202020202020202020202020202020202020202020202020202020202020201C4430006942616E676B6F6B20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020201C3136000831323334353620201C443100153132333435363738393031323334351C353000063130202020201C303300063232303932361C303400063231323330351C484F00963031313230303030303030303130303030303031303030303030303031303030303030313030303030303030313030303030303130303030303030303130303030303031303030303030303031303030303030313030303030303030313030301C484E00033132331C03A9
Example Response Unsuccessful : 02006336303030303030303030313132304E44311C30320040486F73742052656A65637465642020202020202020202020202020202020202020202020202020201C0313
4. Settlement All Hosts(Teansaction Code = 50)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| HN | N | 3 | NII | 999 = All HOST |
| 45 | N | 1 | Merchant Number (ForMultiMerchant) | 1 = Merchant No. 1 2 = Merchant No. 2 |
| J6 | ANS | 2 | Bank ID | ** Optional, if value is presented and not be 00, EDC will prompt for the selected bank If value = 00, all banks supported will be selected 04 |
Example Request : 02003236303030303030303030313035303030311C484E00033939391C53350001311C0374
EDC sends data to POS(EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| ZZ | ANS | LLLVAR | Batch SettleStatus | Format: Host Index(3)+NII(3)+Settlement Status(2) +CaptureSaleCount(4)+CaptureSaleAmount(12) +CaptureRefundCount(4)+CaptureRefundAmount(12) +DebitSaleCount(4)+DebitSaleAmount(12) +DebitRefundCount(4)+DebitRefundAmount(12) +AuthorizeSaleCount(4)+AuthorizeSaleAmount (12) +AuthorizeRefundCount(4)+AuthorizeRefundAmount(12)+**Optional Bank ID if requested Bank ID is presented = 104 - 106 bytes per host Example : 000120NA00100000000100000000000000000000 00000000000000000000000000000000000 00000000000000000000000000000000000000 001120NA00100000000100000000000000000000 00000000000000000000000000000000000 0000000000000000000000000000000000000004 |
Example Response Success :
02116736303030303030303030313135303030311C5A5A11443030313132334E4130313132303030303130303030303030303130303030303031303030303030303130303030303030303030323333333330303130303030303030303233333333303030353030303030303233333231313030303630303030303030303132333330303231323430303031313230303030313030303030303030313030303030303130303030303030313030303030303030303032333333333030313030303030303030323333333330303035303030303030323333323131303030363030303030303030313233333030333132353030303131323030303031303030303030303031303030303030313030303030303031303030303030303030303233333333303031303030303030303032333333333030303530303030303032333332313130303036303030303030303031323333303034313236303030313132303030303130303030303030303130303030303031303030303030303130303030303030303030323333333330303130303030303030303233333333303030353030303030303233333231313030303630303030303030303132333330303531323730303031313230303030313030303030303030313030303030303130303030303030313030303030303030303032333333333030313030303030303030323333333330303035303030303030323333323131303030363030303030303030313233333030363132383030303131323030303031303030303030303031303030303030313030303030303031303030303030303030303233333333303031303030303030303032333333333030303530303030303032333332313130303036303030303030303031323333303037313239303030313132303030303130303030303030303130303030303031303030303030303130303030303030303030323333333330303130303030303030303233333333303030353030303030303233333231313030303630303030303030303132333330303831333030303031313230303030313030303030303030313030303030303130303030303030313030303030303030303032333333333030313030303030303030323333333330303035303030303030323333323131303030363030303030303030313233333030393133313030303131323030303031303030303030303031303030303030313030303030303031303030303030303030303233333333303031303030303030303032333333333030303530303030303032333332313130303036303030303030303031323333303130313332303030313132303030303130303030303030303130303030303031303030303030303130303030303030303030323333333330303130303030303030303233333333303030353030303030303233333231313030303630303030303030303132333330313131333345523031313230303030313030303030303030313030303030303130303030303030313030303030303030303032333333333030313030303030303030323333333330303035303030303030323333323131303030363030303030303030313233331C0308
Example Response Unsuccessful : 02006336303030303030303030313132304E44311C30320040486F73742052656A65637465642020202020202020202020202020202020202020202020202020201C0313
5. Sale Wallet(Transaction Code = 70)
Transaction Flow
This command include AliPay, WeChat, KPlus, QR Credit application
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 40 | ANS | 12 | Amount Transaction | Ex. 000000001000 = 10. 00 |
| A1 | ANS | 2 | AliPay = 01 WeChat = 02 Thai QR Payment = 03 QR Credit = 04 |
|
| R1 | ANS | 20 | Reference 1 | |
| R2 | ANS | 20 | Reference 2 | |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
| OPTIONAL FOR VAT REFUND ** อนาคตอาจจะใช้ | ||||
| V1 | ANS | 10 | VAT Amount | Ex. 000000001000 = 10. 00 |
| V2 | ANS | 10 | Tax Allowance | Ex. 000000002000 = 20. 00 |
| V3 | ANS | 20 | Merchant Unique Value | |
| V4 | ANS | 6 | Campaign Type |
Example Request Alipay : 02004236303030303030303030313037303030311C343000123030303030303030313030301C4131000230311C0308
Example Request Wechat : 02004236303030303030303030313037303030311C343000123030303030303030313030301C4131000230321C030B
Example Request ThaiQR Payment : 02004236303030303030303030313037303030311C343000123030303030303030313030301C4131000230331C030A
Example Request QR Credit : 02004236303030303030303030313037303030311C343000123030303030303030313030301C4131000230341C030D
EDC sends data to POS (EDC -> POS)
- If EDC got the request message from POS, EDC will send ACK message(0x06). but if EDC busy at the moment EDC will send NAK message(0x15)
- If payment process success EDC will return reponse as the table below.
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 96 | Merchant Name and Address | |
| 03 | N | 6 | Transaction Data(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| 01 | ANS | 6 | Approval Code | |
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| D2 | ANS | . . 20 | Card Issuer Name | |
| 30 | N | . . 40 | Primary Account Number (Card Number) | |
| 31 | N | 4 | Card Expiry Date(YYMM) | |
| 50 | N | 6 | Batch No. | |
| D3 | ANS | 12 | Reference No. | |
| D5 | ANS | 26 | Card Holder Name | |
| A1 | ANS | 2 | AliPay = 01 WeChat = 02 Thai QR Payment = 03 QR Credit = 04 |
|
| R1 | ANS | 20 | Reference 1 | |
| R2 | ANS | 20 | Reference 2 | |
| U1 | ANS | 20 | Unique ID | ** Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
| WT | N | 3 | Wallet Payment Type | ** Conditional Responded when QR Combined is applicable |
| WC | N | ..19 | Wallet Credit Card Number | **Conditional Responded when WT = 04 |
Example Response Success [ThaiQR Payment] :
02037336303030303030303030313137303030311C30320040535543434553532020202020202020202020202020202020202020202020202020202020202020201C4430006942616E676B6F6B20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020201C303300063232303932361C303400063231333434331C303100063030303030301C363500063030303031301C3136000831323334353620201C443100153132333435363738393031323334351C4432001050524F4D5054205041591C3330001431323334353637383930313233341C33310004303232301C353000063130202020201C443300123130303020202020202020201C443500264A6F686E20446F652020202020202020202020202020202020201C4131000230331C5231002031323334353637383930202020202020202020201C5232002031323334352020202020202020202020202020201C0368
Example Response Success [Alipay] :
02037336303030303030303030313137303030311C30320040535543434553532020202020202020202020202020202020202020202020202020202020202020201C4430006942616E676B6F6B20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020201C303300063232303932361C303400063231333632381C303100063030303030301C363500063030303031301C3136000831323334353620201C443100153132333435363738393031323334351C44320010414C49504159202020201C3330001431323334353637383930313233341C33310004303232301C353000063130202020201C443300123130303020202020202020201C443500264A6F686E20446F652020202020202020202020202020202020201C4131000230311C5231002031323334353637383930202020202020202020201C5232002031323334352020202020202020202020202020201C0305
Example Response Success [Wechat] :
02037336303030303030303030313137303030311C30320040535543434553532020202020202020202020202020202020202020202020202020202020202020201C4430006942616E676B6F6B20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020201C303300063232303932361C303400063231333730391C303100063030303030301C363500063030303031301C3136000831323334353620201C443100153132333435363738393031323334351C44320010574543484154202020201C3330001431323334353637383930313233341C33310004303232301C353000063130202020201C443300123130303020202020202020201C443500264A6F686E20446F652020202020202020202020202020202020201C4131000230321C5231002031323334353637383930202020202020202020201C5232002031323334352020202020202020202020202020201C0304
Example Response Success [QR Credit] :
02037336303030303030303030313137303030311C30320040535543434553532020202020202020202020202020202020202020202020202020202020202020201C4430006942616E676B6F6B20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020201C303300063232303932361C303400063231333830331C303100063030303030301C363500063030303031301C3136000831323334353620201C443100153132333435363738393031323334351C44320010515220435245444954201C3330001431323334353637383930313233341C33310004303232301C353000063130202020201C443300123130303020202020202020201C443500264A6F686E20446F652020202020202020202020202020202020201C4131000230341C5231002031323334353637383930202020202020202020201C5232002031323334352020202020202020202020202020201C0305
Example Response Unsuccessful : 02006336303030303030303030313132304E44311C30320040486F73742052656A65637465642020202020202020202020202020202020202020202020202020201C0313
6. Void Wallet(Transaction Code = 26)
Transaction Flow
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
Example Request : 02002936303030303030303030313032363030311C363500063030303032351C031A
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example | |
|---|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | ||
| D0 | ANS | 69 | Merchant Name and Address | ||
| 03 | N | 6 | Transactoion Date(YYMMDD) | ||
| 04 | N | 6 | Transaction Time(HHMMSS) | ||
| 01 | ANS | 6 | Approval Code | ||
| 65 | ANS | 6 | Invoice No. (Trace No. ) | ||
| 16 | N | 8 | Terminal ID | ||
| D1 | ANS | 15 | Merchant ID | ||
| D2 | ANS | . . 20 | Card Issuer Name/ Wallet type(text) | ||
| 30 | N | . . 40 | Primary Account Number(Card Number) | ||
| 31 | N | 4 | Card Expiry Date(YYMM) | ||
| 50 | N | 6 | Batch No. | ||
| D3 | ANS | 12 | Reference No. | ||
| D5 | ANS | 26 | Card Holder Name | ||
| A1 | ANS | 2 | AliPay = 01 WeChat = 02 Thai QR Payment = 03 QR Credit = 04 |
||
| R1 | ANS | 20 | Reference 1 | ||
| R2 | ANS | 20 | Reference 2 | ||
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
Example Response Success :
02039136303030303030303030313132363030311C30320040535543434553532020202020202020202020202020202020202020202020202020202020202020201C4430006942616E676B6F6B20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020201C303300063232303932361C303400063231313734341C303100063030303030301C363500063030303031301C3136000831323334353620201C443100153132333435363738393031323334351C443200104150504C4520202020201C3330001431323334353637383930313233341C33310004303232301C353000063130202020201C443300123130303020202020202020201C443500264A6F686E20446F652020202020202020202020202020202020201C5231002031323334353637383930202020202020202020201C5232002031323334352020202020202020202020202020201C5531002031313131313131312020202020202020202020201C03BE
Example Response Unsuccessful : 02006336303030303030303030313132304E44311C30320040486F73742052656A65637465642020202020202020202020202020202020202020202020202020201C0313
7. Installment Transaction (Transaction Code = 41)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example | |
|---|---|---|---|---|---|
| 40 | ANS | 12 | Amount | ||
| N1 | ANS | 2 | Payment Type | 11 = Merchant pay Interest, Other Product 12 = Merchant pay Interest, Promotion Product 21 = Customer pay Interest, Other Produc 22 = Customer pay Interest, Promotion Product 31 = Supplier Pay Interest 41 = Special Interest |
|
| N2 | ANS | 2 | Payment Term | Month for Installment | |
| N3 | ANS | 5 | Supplier Code | Supplier Code 5 Character | |
| N4 | ANS | 9 | Product Code | Product Code 9 Character | |
| N5 | ANS | 13 | Serail No. | Product Serial Number | |
| NA | ANS | 20 | Product Referance Number. | Referance Number(Optionnal) Define for TTB | |
| NB | ANS | 20 | SKU. | Stock Keeping Unit(Optionnal) Define for TTB | |
| S3 | ANS | 1 | Payment Source of Funds. | Optional Field Reserved for AEON Bank. 0 = Payment Bank Card(Credit Card) 1 = QR Payment |
|
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
|
| J6 | ANS | 2 | Bank ID | ** Optional, if value is presented and not be 00, EDC will prompt for the selected bank 04 |
Example Request : 02011636303030303030303030313034313030311C343000123030303030303031303030301C4E31000232311C4E32000230371C4E33000531323334351C4E3400093132333435363738391C4E350013313233343536373839303132331C5531002032303232303932363932313533343633383833381C0328
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 96 | Merchant Name and Address | |
| 03 | N | 6 | Transaction Data(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| 01 | ANS | 6 | Approval Code | |
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| D2 | ANS | . . 20 | Card Issuer Name | |
| 30 | N | . . 40 | Primary Account Number (Card Number) | |
| 31 | N | 4 | Card Expiry Date(YYMM) | |
| 50 | N | 6 | Batch No. | |
| D3 | N | 12 | Reference No. | |
| D4 | N | 2 | Card Issuer ID | 12 |
| D5 | ANS | 26 | Card Holder Name | |
| N1 | ANS | 2 | Payment Type | 11 = Merchant pay Interest, Other Product 12 = Merchant pay Interest, Promotion Product 21 = Customer pay Interest, Other Produc 22 = Customer pay Interest, Promotion Product 31 = Supplier Pay Interest 41 = Special Interest |
| N2 | ANS | 2 | Payment Term | Month for Installment |
| N3 | ANS | 5 | ||
| N4 | ANS | 9 | Product Code | |
| N5 | ANS | 13 | Serail No. | |
| N6 | ANS | 6 | Interest Rate | |
| N7 | ANS | 12 | Out Interest | |
| N8 | ANS | 12 | Total Pay Amount | |
| N9 | ANS | 12 | Monthly Pay Amount | |
| M1 | ANS | 20 | Supplier Name | |
| M2 | ANS | 20 | Product Name | |
| M3 | AND | 20 | Model Name | |
| R1 | ANS | 20 | Reference 1 | |
| R2 | ANS | 20 | Reference 2 | |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
| J6 | ANS | 2 | Bank ID | Returns the bank that belongs to the proceed transaction 04 |
Example Response Success :
02057536303030303030303030313134313030311C30320040535543434553532020202020202020202020202020202020202020202020202020202020202020201C4430006942616E676B6F6B20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020201C303300063232303932361C303400063231353433311C303100063030303030301C363500063030303031301C3136000831323334353620201C443100153132333435363738393031323334351C443200104150504C4520202020201C33300016313233343536373839303132333435361C33310004303232301C353000063130202020201C443300123132333435363738393031321C4434000231321C443500264A6F686E20446F652020202020202020202020202020202020201C4E31000231321C4E32000231321C4E33000531323334351C4E3400093132333435363738391C4E3500153132333435363738393031323334351C4E3600063132333435361C4E3700123030303030303030303031301C4E3800123030303030303030303031301C4E3900123030303030303030303031301C4D310020464F58434F4E20202020202020202020202020201C393400254D616320426F6F6B20202020202020202020202020202020201C4D33002050726F20313073202020202020202020202020201C5231002072656631202020202020202020202020202020201C5232002072656632202020202020202020202020202020201C0358
Example Response Unsuccessful : 02006336303030303030303030313132304E44311C30320040486F73742052656A65637465642020202020202020202020202020202020202020202020202020201C0313
8. Redeem E-Voucher(Transaction Code = 43)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 95 | ANS | 1 | Redeem Type | 1 = E-Voucher |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
| J6 | ANS | 2 | Bank ID | ** Optional, if value is presented and not be 00, EDC will prompt for the selected bank 04 |
Example Request : 02006336303030303030303030313034333030311C39350001311C393600093030303030303031301C5531002032303232303932363932313536353731313937331C0317
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 96 | Merchant Name and Address | |
| 03 | N | 6 | Transaction Data(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| 01 | ANS | 6 | Approval Code | |
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| D2 | ANS | . . 20 | Card Issuer Name | |
| 30 | N | . . 40 | Primary Account Number (Card Number) | |
| 31 | N | 4 | Card Expiry Date(YYMM) | |
| 50 | N | 6 | Batch No. | |
| D3 | N | 12 | Reference No. | |
| D4 | N | 2 | Card Issuer ID | 12 |
| D5 | ANS | 26 | Card Holder Name | |
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 93 | ANS | 12 | Net Sale Amount | 000000012345 = 123. 45 |
| 94 | ANS | 25 | Product Name | Fill with space |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| 97 | ANS | 12 | Redeem Amount | 000000012345 = 123. 45 |
| 98 | ANS | 9 | Balance Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
| J6 | ANS | 2 | Bank ID | Returns the bank that belongs to the proceed transaction 04 |
9. Redeem E-Voucher+Credit(Transaction Code = 43)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 95 | ANS | 1 | Redeem Type | 2 = E-Voucher+Credit |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
Example Request : 02008036303030303030303030313034333030311C343000123030303030303031303030301C39350001321C393600093030303030303031301C5531002032303232303932363932313538303939363035321C03FC
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 96 | Merchant Name and Address | |
| 03 | N | 6 | Transaction Data(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| 01 | ANS | 6 | Approval Code | |
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| D2 | ANS | . . 20 | Card Issuer Name | |
| 30 | N | . . 40 | Primary Account Number (Card Number) | |
| 31 | N | 4 | Card Expiry Date(YYMM) | |
| 50 | N | 6 | Batch No. | |
| D3 | N | 12 | Reference No. | |
| D4 | N | 2 | Card Issuer ID | 12 |
| D5 | ANS | 26 | Card Holder Name | |
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 93 | ANS | 12 | Net Sale Amount | 000000012345 = 123. 45 |
| 94 | ANS | 25 | Product Name | Fill with space |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| 97 | ANS | 12 | Redeem Amount | 000000012345 = 123. 45 |
| 98 | ANS | 9 | Balance Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
10. Redeem Product(Transaction Code = 43)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 95 | ANS | 1 | Redeem Type | 4 = Discount % Fix Point |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
Example Request : 02006636303030303030303030313034333030311C3931000530303030311C3932000231301C39350001331C5531002032303232303932363932313539313139373535351C0304
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 96 | Merchant Name and Address | |
| 03 | N | 6 | Transaction Data(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| 01 | ANS | 6 | Approval Code | |
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| D2 | ANS | . . 20 | Card Issuer Name | |
| 30 | N | . . 40 | Primary Account Number (Card Number) | |
| 31 | N | 4 | Card Expiry Date(YYMM) | |
| 50 | N | 6 | Batch No. | |
| D3 | N | 12 | Reference No. | |
| D4 | N | 2 | Card Issuer ID | 12 |
| D5 | ANS | 26 | Card Holder Name | |
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 93 | ANS | 12 | Net Sale Amount | 000000012345 = 123. 45 |
| 94 | ANS | 25 | Product Name | Fill with space |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| 97 | ANS | 12 | Redeem Amount | 000000012345 = 123. 45 |
| 98 | ANS | 9 | Balance Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
11. Redeem Discount % Fix Point(Transaction Code = 43)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 95 | ANS | 1 | Redeem Type | 4 = Discount % Fix Point |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
Example Request : 02005136303030303030303030313034333030311C343000123030303030303031303030301C3931000530303030311C39350001341C0371
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 96 | Merchant Name and Address | |
| 03 | N | 6 | Transaction Data(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| 01 | ANS | 6 | Approval Code | |
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| D2 | ANS | . . 20 | Card Issuer Name | |
| 30 | N | . . 40 | Primary Account Number (Card Number) | |
| 31 | N | 4 | Card Expiry Date(YYMM) | |
| 50 | N | 6 | Batch No. | |
| D3 | N | 12 | Reference No. | |
| D4 | N | 2 | Card Issuer ID | 12 |
| D5 | ANS | 26 | Card Holder Name | |
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 93 | ANS | 12 | Net Sale Amount | 000000012345 = 123. 45 |
| 94 | ANS | 25 | Product Name | Fill with space |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| 97 | ANS | 12 | Redeem Amount | 000000012345 = 123. 45 |
| 98 | ANS | 9 | Balance Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
12. Redeem Discount % Var Point(Transaction Code = 43)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 95 | ANS | 1 | Redeem Type | 5 = Discount % Var Point |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
Example Request : 0200513630303030302004136303030303030303030313034333030311C343000123030303030303031303030301C39350001351C0340030303030313034333030311C343000123030303030303031303030301C3931000530303030311C39350001341C0371
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 96 | Merchant Name and Address | |
| 03 | N | 6 | Transaction Data(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| 01 | ANS | 6 | Approval Code | |
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| D2 | ANS | . . 20 | Card Issuer Name | |
| 30 | N | . . 40 | Primary Account Number (Card Number) | |
| 31 | N | 4 | Card Expiry Date(YYMM) | |
| 50 | N | 6 | Batch No. | |
| D3 | N | 12 | Reference No. | |
| D4 | N | 2 | Card Issuer ID | 12 |
| D5 | ANS | 26 | Card Holder Name | |
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 93 | ANS | 12 | Net Sale Amount | 000000012345 = 123. 45 |
| 94 | ANS | 25 | Product Name | Fill with space |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| 97 | ANS | 12 | Redeem Amount | 000000012345 = 123. 45 |
| 98 | ANS | 9 | Balance Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
13. Balance Point Inquiry(Transaction Code = 34)
POS sends request to EDC(POS -> EDC)
Example Request : 02001836303030303030303030313033343030311C0336
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| 98 | ANS | 9 | Balance Point | Non Decimal Ex. 000001000 = 1000 point. |
Example Response Success : 02007736303030303030303030313133343030311C30320040415050524F56454420202020202020202020202020202020202020202020202020202020202020201C393800093030303035393436331C0324
14. Retrieve transaction bt Trace Number (Transaction Code = 71)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| J6 | ANS | 2 | Bank ID | ** Optional, if value is not presented, EDC will treat the request for main bank 04 |
Example Request : 02002936303030303030303030313037313030311C363500063030303030331C031C
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example | |
|---|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | ||
| D0 | ANS | 69 | Merchant Name and Address | ||
| 03 | N | 6 | Transactoion Date(YYMMDD) | ||
| 04 | N | 6 | Transaction Time(HHMMSS) | ||
| 01 | ANS | 6 | Approval Code | ||
| 65 | ANS | 6 | Invoice No. (Trace No. ) | ||
| 16 | N | 8 | Terminal ID | ||
| D1 | ANS | 15 | Merchant ID | ||
| D2 | ANS | . . 20 | Card Issuer Name | ||
| 30 | N | . . 40 | Primary Account Number(Card Number) | ||
| 31 | N | 4 | Card Expiry Date(YYMM) | ||
| 50 | N | 6 | Batch No. | ||
| D3 | ANS | 12 | Reference No. | ||
| D5 | ANS | 26 | Card Holder Name | ||
| R1 | ANS | 20 | Reference 1 | ||
| R2 | ANS | 20 | Reference 2 | ||
| J6 | ANS | 2 | Bank ID | Returns the bank that belongs to the proceed transaction 04 |
15. Retrieve transaction by Reference 1 (Transaction Code = 72)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| R1 | ANS | 20 | Reference 1 | |
| J6 | ANS | 2 | Bank ID | ** Optional, if value is not presented, EDC will treat the request for main bank 04 |
Example Request : 02002936303030303030303030313037313030311C363500063030303030331C031C
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example | |
|---|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | ||
| D0 | ANS | 69 | Merchant Name and Address | ||
| 03 | N | 6 | Transaction Date(YYMMDD) | ||
| 04 | N | 6 | Transaction Time(HHMMSS) | ||
| 01 | ANS | 6 | Approval Code | ||
| 65 | ANS | 6 | Invoice No. (Trace No. ) | ||
| 16 | N | 8 | Terminal ID | ||
| D1 | ANS | 15 | Merchant ID | ||
| D2 | ANS | . . 20 | Card Issuer Name | ||
| 30 | N | . . 40 | Primary Account Number(Card Number) | ||
| 31 | N | 4 | Card Expiry Date(YYMM) | ||
| 50 | N | 6 | Batch No. | ||
| D3 | ANS | 12 | Reference No. | ||
| D5 | ANS | 26 | Card Holder Name | ||
| R1 | ANS | 20 | Reference 1 | ||
| R2 | ANS | 20 | Reference 2 | ||
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
|
| J6 | ANS | 2 | Bank ID | Returns the bank that belongs to the proceed transaction 04 |
16. Retrieve transaction by Unique ID (Transaction Code = 73)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
| J6 | ANS | 2 | Bank ID | ** Optional, if value is not presented, EDC will treat the request for main bank 04 |
Example Request : 02004336303030303030303030313037333030311C5531002033202020202020202020202020202020202020201C0325
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example | |
|---|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | ||
| D0 | ANS | 69 | Merchant Name and Address | ||
| 03 | N | 6 | Transaction Date(YYMMDD) | ||
| 04 | N | 6 | Transaction Time(HHMMSS) | ||
| 01 | ANS | 6 | Approval Code | ||
| 65 | ANS | 6 | Invoice No. (Trace No. ) | ||
| 16 | N | 8 | Terminal ID | ||
| D1 | ANS | 15 | Merchant ID | ||
| D2 | ANS | . . 20 | Card Issuer Name | ||
| 30 | N | . . 40 | Primary Account Number(Card Number) | ||
| 31 | N | 4 | Card Expiry Date(YYMM) | ||
| 50 | N | 6 | Batch No. | ||
| D3 | ANS | 12 | Reference No. | ||
| D5 | ANS | 26 | Card Holder Name | ||
| R1 | ANS | 20 | Reference 1 | ||
| R2 | ANS | 20 | Reference 2 | ||
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
|
| J6 | ANS | 2 | Bank ID | Returns the bank that belongs to the proceed transaction 04 |
17. Waiting card insert (Transaction Code = C0)
EDC sends to POS(EDC -> POS)
No additional field sent. One way communication, no need any response. EDC will sent this command to POS when received Transaction Code 20. Only applied when KIOSK mode is enable, normal POS won't be effected.
Example : 02001836303030303030303030313143303030311C0343
18. Chip card inserted (Transaction Code = C1)
EDC sends to POS(EDC -> POS)
No additional field sent. One way communication, no need any response. EDC will sent this command to POS when the chip card inserted. Only applied when KIOSK mode is enable, normal POS won't be effected.
Example : 02001836303030303030303030313143313030311C0342
19. Waiting card remove (Transaction Code = C2)
EDC sends to POS(EDC -> POS)
No additional field sent. One way communication, no need any response. EDC will sent this command to POS when waiting for card removal. Only applied when KIOSK mode is enable, normal POS won't be effected.
Example : 02001836303030303030303030313143323030311C0341
20. Chip card remove (Transaction Code = C3)
EDC sends to POS(EDC -> POS)
No additional field sent. One way communication, no need any response. EDC will sent this command to POS when the card removed. Only applied when KIOSK mode is enable, normal POS won't be effected.
Example : 02001836303030303030303030313143333030311C0340
21. Waiting PIN entry (Transaction Code = P1)
EDC sends to POS(EDC -> POS)
No additional field sent. One way communication, no need any response. EDC will sent this command to POS when waiting for PIN entry. Only applied when KIOSK mode is enable, normal POS won't be effected.
Example : 02001836303030303030303030313150313030311C0351
22. PIN entry finished (Transaction Code = P2)
EDC sends to POS(EDC -> POS)
No additional field sent. One way communication, no need any response. EDC will sent this command to POS when PIN entry finished. Only applied when KIOSK mode is enable, normal POS won't be effected.
Example : 02001836303030303030303030313150323030311C0352
23. PIN timeout (Transaction Code = P3)
EDC sends to POS(EDC -> POS)
No additional field sent. One way communication, no need any response. EDC will sent this command to POS when PIN entry timeout. Only applied when KIOSK mode is enable, normal POS won't be effected.
Example : 02001836303030303030303030313150333030311C0353
24. PIN cancel (Transaction Code = P4)
EDC sends to POS(EDC -> POS)
No additional field sent. One way communication, no need any response. EDC will sent this command to POS when PIN canceled. Only applied when KIOSK mode is enable, normal POS won't be effected.
Example : 02001836303030303030303030313150343030311C0354
25. Communication test (Transaction Code = D0)
POS sends request to EDC(POS -> EDC)
No additional field sent. EDC will response the same Transaction Code to POS
Example : 02001836303030303030303030313144303030311C0344
26. Communication cancel (Transaction Code = D1)
POS sends to EDC(POS -> EDC)
No additional field sent. EDC will repsonse 0x0000, which indicated successfully cancel. If EDC finished transaction process it will return other response.
Example : 02001836303030303030303030313144313030311C0345
27. Card Information Inquiry (Transaction Code = I1)
When EDC received the command I1 - Card Information Inquiry, EDC will prompt the screen to accept the card. After the card was inserted and read, selected information will be send to POS according to the pos'request sent. If no field present, EDC will returns only masking card number which present in card reader.
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| CI | N | 3 | Card Type Identifier | **Optional |
Example Request : 02001836303030303030303030313049313030311C0349
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| 30 | N | . . 40 | Primary Account Number(Card Number) | When CI is absent or = 00, this field will be appeared in the response. Ex. 417770XXXXXX4223 |
| T1 | N | 13-19 | When CI = 01, this field will be appeared in the response. Ex. 1234567890123 |
|
| T2 | ANS | ..255 | When CI = 01, this field will be appeared in the response. Ex. โชติรวี หลวงวงค์ |
|
| T3 | ANS | ..255 | When CI = 01, this field will be appeared in the response. Ex. CHOTRAWEE LOUNGWONG |
|
| T4 | ANS | ..255 | When CI = 01, this field will be appeared in the response. Ex. 01/01/2501 |
|
| T5 | ANS | ..255 | When CI = 01, this field will be appeared in the response. Ex. 111/11 หมู่ 1 ... |
Example Response Success : 02008236303030303030303030313149313030311C30320040535543434553532020202020202020202020202020202020202020202020202020202020202020201C3330001431323334353637383930313233341C03E1
28. Refund (Transaction Code = 27)
Transaction Flow
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 40 | ANS | 40 | Amount | 1000 = 10.00 |
| 45 | N | 6 | Merchant No for multimerchant | |
| P0 | N | 10 | Card holder telephone no | |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
Example Request : 02003536303030303030303030313032373030311C343000123030303030303030313030301C0312
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example | |
|---|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | ||
| D0 | ANS | 96 | Merchant Name and Address | ||
| 03 | N | 6 | Transaction Data(YYMMDD) | ||
| 04 | N | 6 | Transaction Time(HHMMSS) | ||
| 01 | ANS | 6 | Approval Code | ||
| 65 | ANS | 6 | Invoice No. (Trace No. ) | ||
| 16 | N | 8 | Terminal ID | ||
| D1 | ANS | 15 | Merchant ID | ||
| D2 | ANS | . . 20 | Card Issuer Name | ||
| 30 | N | . . 40 | Primary Account Number (Card Number) | ||
| 31 | N | 4 | Card Expiry Date(YYMM) | ||
| 50 | N | 6 | Batch No. | ||
| D3 | ANS | 12 | Reference No. | ||
| 40 | ANS | 12 | Transaction Amount | ||
| D5 | ANS | 26 | Card Holder Name | ||
| R1 | ANS | 20 | Reference 1 | ||
| R2 | ANS | 20 | Reference 2 | ||
| U1 | ANS | 20 | Unique ID | **Optional If POS sent Unique ID EDC will be response same value |
|
| J6 | ANS | 2 | Bank ID | Returns the bank that belongs to the proceed transaction 04 |
Example Response Success :
02037236303030303030303030313132373030311C30320040535543434553532020202020202020202020202054455354204C494E4520322020202020202020201C4430006942616E676B6F6B2020202020202020202020202020202054455354204C494E45203220202020202020202020202054455354204C494E4520332020202020202020202020201C303300063232313232311C303400063136313034391C303100063030303030301C363500063030303031301C3136000831323334353620201C443100153132333435363738393031323334351C443200104150504C4520202020201C4434000231321C3330001431323334353637383930313233341C33310004303232301C353000063130202020201C443300123130303020202020202020201C343000123030303030303030313030301C443500264A6F686E20446F652020202020202020202020202020202020201C5531002032303232313233353531363130343731393430301C4A36000232341C034E
Example Response Unsuccessful : 02006336303030303030303030313132374E44311C303200404445434C494E454420202020202020202020202020202020202020202020202020202020202020201C0312
29. Waiting for Signature (Transaction Code = S1)
EDC sends to POS(EDC -> POS)
No additional field sent. One way communication, no need any response. EDC will sent this command to POS when EDC display prompt to signature on screen. Only applied when KIOSK mode is enable, normal POS won't be effected.
Example : 02001836303030303030303030313153313030311C0352
30. Signature captured (Transaction Code = S2)
EDC sends to POS(EDC -> POS)
No additional field sent. One way communication, no need any response. EDC will sent this command to POS when signature has confirmed. Only applied when KIOSK mode is enable, normal POS won't be effected.
Example : 02001836303030303030303030313153323030311C0351
31. Key Exchange using ECDH key agreement (Transaction Code = K1)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| K1 | ANS | ..99 | POS Public Key Base64 |
Example Request : 0200673630303030303030303031304B313030311C4B31004441357579723543636F777133515132422B4344766C48642B494239326846643432304267514E76686F65502F1C033F
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| K2 | ANS | ..99 | EDC Public Key Base64 |
Example Response :
0200673630303030303030303031314B313030311C4B32004441764C6F654A316D6334753056667A575059374F434254794C7A39456B4C317A3641685A67724A4531484B451C032F
32. K-CheckID (Transaction Code = I2)
When EDC received the command I2 - K-CheckID, EDC will prompt the screen to accept the card. After the card was inserted and read, selected information will be send to POS according to the pos'request sent. If no field present, EDC will returns only data payload.
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|
Example Request : 02001236303030303030303030313049323030311C0340
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| 30 | N | . . 999 | Payload Data |
Example Response Success : 02409636303030303030303030313149323030311C30320028415050524F56454420202020202020202020202020202020202020202020202020202020202020201C333040527B2261646472657373223A22222C226167656E745472616E734964223A22444947494F3030303132333131303731353236333830303438343539222C226270314E6F223A22222C2263617264496D616765223A22646174613A696D6167652F6A7065673B6261736536342C2F396A2F34414151536B5A4A5267414241514141415141424141442F3467496F53554E445831425354305A4A544555414151454141414959414141414141495141414274626E5279556B64434946685A576941414141414141414141414141414141426859334E77414141414141414141414141414141414141414141414141414141414141414141414141415141413974594141514141414144544C5141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141416C6B5A584E6A41414141384141414148527957466C61414141425A4141414142526E57466C6141414142654141414142526957466C61414141426A4141414142527956464A44414141426F4141414143686E56464A44414141426F4141414143686956464A44414141426F414141414368336448423041414142794141414142526A63484A304141414233414141414478746248566A4141414141414141414145414141414D5A57355655774141414667414141416341484D41556742484145494141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414146685A5769414141414141414142766F6741414F50554141414F5157466C61494141414141414141474B5A4141433368514141474E705957566F6741414141414141414A4B414141412B45414143327A334268636D45414141414141415141414141435A6D594141504B6E4141414E57514141453941414141706241414141414141414141425957566F6741414141414141413974594141514141414144544C57317364574D414141414141414141415141414141786C626C565441414141494141414142774152774276414738415A774273414755414941424A4147344159774175414341414D674177414445414E762F6241454D4141514542415145424151454241514542415145424151454241514542415145424151454241514542415145424151454241514542415145424151454241514542415145424151454241514542415145424151454241662F6241454D4241514542415145424151454241514542415145424151454241514542415145424151454241514542415145424151454241514542415145424151454241514542415145424151454241514542415145424151454241662F4141424549414C49416C414D4249674143455145444551482F784141664141414242414D424151454241414141414141414141414941415948435151464367454C4167502F78414273454141414177514443516B484451674E427730414141414542515941415163524343457846425557515646686359487741674D4A4A4357526F624842467959304E5462523452495447455246526C5A58574861583176455A493152565A70615931776F694A79677A516B4E6B676F6153307467794E7A684957614C434B546C48596D687964485746694B573278762F4541427742414149444151454241514141414141414141414141414145425159484151494443502F45414438524141454342414D454277594343416341414141414141454145514945495445465156454759584752456853426F624842384255694D6B4C523451667841795653596E4B6973734957513057436B744C692F396F4144414D42414149524178454150774473415955565245696C3841555A73465356462B48796B5477497837335434645349764E66516A2B456A307833473364505778584E4838514973517668667636544378495869595234745A714C427447414434783561564234373374706964655639654F7A4F75684468335436632F77416B75456E3656622F314E4D75366654772B53564262394B70526671645A7770696E7651335747466D44644979474A7867576E634E6C6E4E52655335486A556E52315A6D6B3242394A43434E4967714E7A364363526B78456749536D4E375646654730726B2B7676596C3175356D454B4565365054772B53744172394B70526634615739376F465072354C314833394B74512F7743476C6A655A4D4951516430446841766B30306350306D6F682F3461575748504349664A7A6F7266704D52452F773073623761396D45494A58724468475069496F6C41386E373469496E2B476E4C6C6233436668462F695A6F65665474476239546A47673877433777376A4971637444387A2F504F72705A706E45554547546A72316D533854414D322F4142366954312B7564302B6C2B706C324F6839666D4F61454C65454843522F464E51382B6D574E48366E47562B6545692B4C6D6864394B305A76314F4D6142656F4373353368346F744E415277452F6D426A666C2B4A336F7857324F626373776842426644684976676251694275782F7569526D3755626C394C4B364F457345576B4E4349486B6D7336524761546E6435754C4869797362374A684343482F6C4C4C6F6C65756843432F38415561524C38557332326562666D6643572F684E43486D7044736344514848696B6842476A4F694261386A5A45596C516164425338504D75576A5232564C706976433279757468436875357545692F483943483833597A2F584A7377764C2B455975344A664A5A554C376B39306267526B5A756D53792B3263325A4833546969443356556E427353736C4F547264616D4E375537662B48635243596C4D2F6656355434473445596E795A77774934534369585351696344684C433565485178576E52636547534D76386A46456A5356654561573871464C44465471337974795A5A4D4A64486B795A4D6D5851736471492B465168756A51394B6A67316F6A4269454468757036565348545A69664F6649364E434E4C4B524B50776230766C6C78536D31376A52307549547776694F616F632B5836445443774E6F664B4C43534859382B4C7238344C6E6A2F66496D4F61725A374359584A2F54674C77735346487775305A45325667676165684A37484F6A656E62776C30762B6B684A3455542F72676D4D30735662574A3846662F706C302F525162785343547446643350446646587A395458416C39472B4135656E496849304E435646344A78614D547853525649634865525634654B6E33794B666D3665624C672F5233676A522F497A5A4C776368656D49626C4A30593379555941684C7647767A6E795A4A3164444D49573264472B445966776D4C554D4C66686D6E6474665469624637764545666A6A684839496963614266756439412B56302B784C6756394861637330325331363854554E384C4246436764525833675A4247436445434251794E796E54722B2B33756470366144492F684A38384F786C376F563938634B6546465741364F4E6C3472597949735945425633416B6C456E566B64476C7371306C7A3548353235354B5548374959506A41717644526D5334496E474466474B74567864666D3966525862304F31637342777142516A667864306952746674414236667373787330784377756A66376C4450347031614D6E7071646B59456F7A467444574C74516A396A52776A464C534F472F2F414C6F4565496733482B49534578764D533476676C584C526F594A4442594768694F756F5361445267764750486D4F585A39544D6351634266776F46364D6D325850567151356746442B4458445A353674725A615766594D7A632B7A3642434B5746394B696B624263524F46305A49676F4D4A2B41454B6955524E6F3664713276446F502F7367695045507A777053394A6B55436970443138723471323933666F5679664F71586C62726472626D69446D4172776F5463517954366E592B6E74666C653232446D4258362F645631565065374B2F6248356D51596934517670746F6668434B47385230715571676B704C51584268446E4566524554714E4F71374A706857797A5A4F6C6E58374E6969443871716A66394D735066726B337A5559667267556831556E6C51534243565343795578766C65465770322F4A4B61546B3779596B357579546731365239412B6D2B52344C71536958526A51636269557537346B6D416856447538706F397A3364386959377A624E6243466342374F43687838716D6A6A394D305050726B7747384E776E3047734F446E697776424A436D564962457663724D6B59726E4636644F623134557849536B38474650706B356A79443054364A596677616A5452396C6B376A4D4F3532664D32764C6D7461596A68486F31554A7A41315349314D4B524A2B4C63456A354F7030354A667A5837644E72435858504C4747366F3830766145634A53304B4E4F416C483367373178477778414150783471594A755371587A3164374663703472484D46334262694170785368344B6F724978594959624975444E4B6A444D41416537765937356151506C504C7953387039716E4E3132457948515A4F65595545694E54424F724C33594E332B414A784F6B78316550476E4D4A2F67664C486A314E694A6545384A554F6F7A5A55496D4638506B65724650576F6A34685269644A6A6B30716C337A71687A7365707044676853737962485A4E486F57345A4E6B4D484A776F4B654639546642754574474D616E7234757764486E305A6F69583676483944575054504A6D5854434C356B77563451384968385574456E365A347A6671616244776734526E3472364876307A526D2F55347A43464C4E4B434F42445276675245364D68324B424177694C5468345A636639314479623846303339747568766D64556B49774C794F45526C6247566247673034567130555745696A48312F6D3174696270643464694E464C517651454A3453786A4B3453493870576867654B53344953724F49687A6654425834547556714E682F305764664A2B6F4E3446547555547877574D6E6F736631396A636C4377665152486C5664446B67433549626973514F594768687646796C7844787362365A4F32394C7471486766464251654C557564444D584543352B62587A366D75756F623050794C4163497144494C6668516E582F7862713973556D732F53394838724A39347555744B77574C334E647032645630536169347A743931434C6F683646746132303135725838442F4451542B486A454D514E3249424F345A4E7648506E79614639456550436766504259614343667A2F566D3034357A36647359305034746B2F684958716C5A5674726271714F495868532F6637714D697537416E5A4E2B7A7356647262594E4339476D442F466B776C733832334E6E74636B4E744D524942445A61626A3634447373672F444C446D4234473433623933686F7550307768657645397641734B5A465930592B7951446E783572624E4E54526B494469672B2F3841476274427A6E3156357466504A75737549464764426E4138586378563161756A4C586F6D77744B696765524846324F44425157546274783438626D6C354C624D5547494D394E42647656394B4B7459312B476744484432444D62364D392B344C6E6B4C7A43357833685678797A537A5A744F505578755564346F4C4B453854555046464148313531596D44472B52635041543263377A4F596A6F6763484F66622F6465445958774C6C4C6947697565327471375364514769504E525A415A42654E6B706A65307837585A7444705939445757526E73506E72646A506E6264556237724F4D5A77616677396753476F4F774D3433766B316137362F54466F3452344B365145466F6578514A5042464F6E6235474D7137316E6E766F2B323356572B654C345A756875635867703142544955464634494667554B6F3441304F53724D384C6633537936496879645838387172556B2B32616E7430536536636D73786C776B58776F6F58666D5A476236347334712F785669743863332B2F365758722B626F394C56385842776B5877786F59665233476236354E6C42792F684976624B386F5831322F7556526D3066444B63756A4D7768574533546E322F73736D626F5951596574626E31632F56592B6A4F7959517075614556425351674F6B496A42495371534B434C4A3468594F6E69327753766A7930566B615738714649703633594A56354D5470564E4F7A6374764349512F5336503451714C41714836584A55324C576E426D306A46716F62776C3135734B4677714533466243685366504474353245777278495838494451336A42763673436F434E79594F4F35386A447862714A34387555534E3778307459704F2B33797452373747634D414B5A46476D6C414F554A44424F4B424B73545A4D4631386A456876636F695936764650796B37376245666C783557354B55664542654638485644433853614974654A3436344B773757786350376E634F795A6151763735664A76756E4A4C763377502B667677727A736558425069417673376B384B444375534354677649483378482F6976766268524E3763366F4E332F4C31714F6155453458616F71312B472F65466D66736B68486968434F6F3372494D46473370424B4A63467069595A6C53394B66566A526C626B53513658464C686670307244426273355271365A7578743330384B67754B5073594B44386553457469314264534B30436A4D4A4536414152456832636E562F457438474D7569576C3832354B654450684F46584D66754D68654B45706338796E5630394D38334F7963394F395277324C4F68647577564E744D6E566B774F54362F695547487452775276446A63376130313058514A522F6875566F2B484B6543334C636478463070576261476B34514943683677776F46564F5770396B39726454514E4769494370542B384330484334684F686773464F2B492B393349705872644C506D6C6C6B77686D45534B5769484842426663624A54674A2B486A7A473355397355697765656E346A69424D4C6449734352596B5562634E326D56462B6A344D596B7345686877356F6A3773497043534850527A416F6654366E6D7142417378447A4537633232707A4D67764D425166654E6336335A63757A354D4D71487063487967556C3446744334365234742F774341654A65725A307337474D484468524679437661673075635A57625A4A316157354E79676B6D3934456B4158665156557A4A7A5A6E736F6742714C55765A724E6E7A756F39564631657358566375327A6E31317A3173794F4E653251746E6F6B37506E795A576C694F4D57454A43644B6842526B2B374D6531543366626B616E4F4A464F434B4367486977734C6F636A626B2F443733644F53546E3965523832636B734945387A784157494249472F504A6D345537496A474D586B704B6768694A7377424E615670664A72447A7534672B586C5A68646A685068643774666269626D4D3454436A66334A36516F737A4C5375346B38702B5575494F36394F587A7365554236544649496E55595155646F30362F38414141433672525A7A4F6D3073634A776E79794D46486B706930474B786F4D324A54456A4C5645414839506E7A394C587A424A4D794D2B4B355846626744302B57395939744F383648496968594F4B4555763568764F6974563445636E7650516654317648566D75444C61647565574E37486C48696C6852396F7A377755696F7878464A55634C553569526C71634966484B304E4D586B78356235366D7257344C656B52527A672F5174686B6C312F534D67756D31592B2F686B596B4B74694A44736D4F6976766C7137324F6E4A715A6B634F516E30476F4941306349744670576D4468516A7152454B79314F727741584A322F526F6831536D315971703454346B666F2B32354D61622F586D737549497572434642776D4E45464878704677524F346A485746674A5A6B634E7A452B774D55546B59567268552B39745471657445595957354834357A66587476756C4645735048443250754867334466756950684C642B426969774C37716E786234542B52443168696B2B7A48566279317169494339672F534670536D695357567871463343596B5A61364378386E5534636B713849315370497250776B775956714E77346C4C2F77433134704D6A446938596C596A6666763841646D534D79775339326E45623149712F65764A6D784A4F416466336673686477374A6B795A4E434A6D3533352B6E2B3630596D454634586E43344352514F3047697A6949514A4F3445765677394F7030354F634236334F5465453870594835387A533632426337382F542F645A64434843483945366A544366437756446541384A4566686F58504C566E6546474A306D776F492F6733387A3673647557566D5843366A4E5239677676436843776C6733443647345261564B4C424A4F70306D6571506E4F374A4F313035616D494E7364756731446D6A6A792B67354C68344F66583043426459634866516A554363554A57476F71774B4A685A3058486861584479474853644A6A6F72664E7A38623673546374584266772F456F2B6B4C486C484751586C5A46333854686C56563553506474697A4E324D526769414B682B6E41676B74386248526A6530757538753639717454632F554234546E7948706530786C4F646C5949474C55356968314A7844784E4A5534567172765971302B687174744C6A4D68314447734F2B6168686433424457375731337252746A63457844722B433751467844592B3752715848674E334D7868436652715033692B686C635150712B7964726E573657724C7059557349446F38434D755A5541686774334A764A387A6E6C782F7A536B37504B79706A39696844384C46676A46706453654B52766A4C6C4846305A4A75315A57414B6B685133516167527954527436775177716839354F386E586D4F6976746E6B717266553263534D556A30514D516969616C41537A55754F477447624A62584F777A38555434664344596C7743586361754766537438325163772F7051454B67485872456862733930693041504C73323154735752726C30756879733468574456415A3978386E587972366447544856303177516E6F723334565365506A734C6467524D636D6C324F39655A2B764C6C726B39725668435846453648764464567868414A644C6F71713065624D796D4D6D515052396E6B6D734E3636613532336479735743696641507441516A3363686D773079503061696F3870414B675549583451684D2B4F4650382F774272656D654F544E5075345152682B6A734B444972476A436B627961584831376E336C4E4D4673535965375658696E6A72597349345566785367336A4367744333344B52706365337841395858307A7259576738467974514A554A4339535862676D434D586D5263516A36695172633533765937477357487963674959666142494C41686E717A5A432F68526C584A2B616E6E497738516B75525745576F3137643573617037776E7041514869514F4342533055437573624F3977432B4E35546F3074393743743872645438656C697770514A384B734B467359776F626A6C355559395332566436796A77713266396A51696B4B49384F665743692B4A43536E41516D4C72327030415039792F6D7874314E59394468446B506334554D4F4252566469654F693438545A6A58376831366E4D374A546F452B4468356961466A563742764C6A33716F59314269455567302F434153776F415343625A616B655753634E43656966527056464665417838704B4F634631496F5471485A475A474A3872595651374F446F7A322B32747A4836667776687971434D7052696B51614C556954544634384853452B5471644F535571656C6E6436376B776D4D7A73722B317A567730443179665133376B39484937753034547732485A34576C782B59474D75584573704D466347746544477A6D746462527048476576646C43325758506C6C3259396A4F445432434E312B6E5372446F5162633355616D454234496D432F4352514D6F53777847524E42654C6C345052716477302F4F657A4B32323768384778432F43526145776C686A3354666A4C774D547231706B3870394F523037576B52736870315146317347544A6B306568466777566D436734515337686437595330566E6850633637347A524637594E767A616D4E78683658464B476A3744645271464772614C534B4A31596D455965524A555244664C6C6F725136573871464770397574684368484344684466696C6F6B665476476239545459676851634978385574447A5847614D33366D335A736D4C4A5849555036634645754A3555747A35415275525A7755772B543247793050752B496D4A5575523234536439754C6D665536706E4441656C78527A705159513977714B4249764269596352345241414745524B6446632F4A667659567662313239414A396350714F614861756C65534873344C365543673338704E492F49324336504B535652534C75354B74464573362F7741714D4C6B62442B574C6154514D6E7735576F4971526A4E43304B4E754D364C6B504D655064343038717363386336703954576678594A334743485549563458543539705061737444772F4E49626D7073566954362F415161376B367A78486C727A507875357076624B6470705039664F2F75745530596C68397458624E666F7A3850357754757951687359614E52376747674949374E656233775044584464516173585871666D667178364D7A436375452F64413636684E5676683736756E624A6B65655A4E2F44626E2B6C31506148496F4A6637774C464267756176747364586D72665A6D61714558427174486B614150536B4938454F45502B4D486C79686772686C7846336747757662737161626C4244632B4D45364C507A75514E2F34426647567455397175324D69383455384A774A73664568434E4F46436446764A317753354C504B334F6E4B715572585A4E44427A433866534352365657366F6A4A47355472315178424D664549387554743555472F476D33632B58506A712B636D4E522B7A6366772F5A4F5463554E57694879356A6A39314A6F6350653863624243303042444C7464555253326C74695949773931423147624A64534651304762416A4877416638415A6C785A3268794B436670514A654F3654564261736875447A6A486C46426B4C6B37655530492F36323573756869614D43645A5249504D4D6A7372476B34734558455A627967593874586A32646272784E5A4E2B57767269465733416E7A55416536317459553979666938726D31625632565A4F70696C682B714C7A67426858636E687338766F783972444B5868376E332F6A504E4E2F6E3135476B49764D425639516C654F76624C4C58726379636C5136483364782B58363936696358596B7655416D39522F6C2F66765454672B71496A48456346616A5532464A634E3459724E6372614657467275525834552F436578373066354D7A665978305877345333344C3049767A7A6A4E3953326843696644387254385731596654476A4643744646664978486A793733442B4464633673664E7150324E464943434E47394F50575562496A4A69473665766938734C6A412B4D66476D50765954452B2B3137744F4B717562587A59762F576E2F655A2B786D386D57552F695A4F677A754267566F48625268586A32366A5644336448435866694368462B63636150716132586450435766694368482B63555A66716132324D4F45596F576B3854526347784D5A4154346D6B717A774A4D556B41526B52446D395A355A673239373062746D62624B4468414B494B586A54374830376A636D43654C47455A456944456876636F72796C613456506B736D384A3364342B4746576C324F70306E33385748414C4D4C6F75515631584141766A36316657354E36767665587866664B6536756A3172504C31487174574E6B323539597A39506F5A4E316870363941636B49754735597159454C344E6F2F6845615742574A7532466350565077643635556B5244354270322F4A316678557154766F556D44466372573671626D7A6266326D6967346F2F51525543344E6F6F4B5346364C4F4675703058334E3145664479322F4A30614965334276356E355A35576A785167364958483745434A433853384D715456484E455275694447476A68397A65676645684759654679644A723139386B4B5A795443526433706435366E6458314F59352B4366654633696E6446675864514B39494B674251377669507A39784F6A397A5A6362586E512F6F54305334546C4B3349554241654879624B596E467A3032737741424F763736434F767662642B522F613232685052486F3077514931596C6F5377625261444B59676C3137566D41495337796F4936764B64376E5A4F666D5A7354677454537034587275484A46303454474B454A5441434C4369596F512B34372B57616438336E74666B595A5667547776395975704E785154436B4E766334684956456E6446646D587462622F63762B44372B53584266387A484E6C4A376737364738507A5549733462306334596F4E626B766B367269464F336D4F69765630353865617434316738685041785636514430753444733939775A2F7059646C73617844424A2B47462F6369495950526E467839744C57555A566839347A632B506E664A2B6965686D6D7346675670387146696A494C6467505258396E52307661516A44323246452B474175546339746658566A746145596F5176437850546773684569686F49474E64796A634730703259334F7272784E6A524452394535524D3341746D76303341657659644445445173615769634135553449657A4259454B67336757614752395959386E454A4472317A2B3349304971685577354541626C766F6D4C6B652F774141597A3150375A4D557050512F68656E796F57386B495151506B365A6941483873333074725963496F5176674F543856456B4B4C767474313562576C495759576468706F5074334B61775754774B6778456C3867536157794C626A58514944566846414B4948584B646D6959474177587441774D655A37386E4D2F6D716471532B4D47443434494B4A4451614D43654C544568482B356456633758366D6469774C34586D42714C46426F63772B426850772B39312B6565656237476A49776F3751764D4277525A45675561546D307038516465596C2F4E6831754C6E6E6C615742456E4943786338725534463762386D5550744E4A3465442B7269616B476A69675931446D724E396B57474742576667536B304442626A75326F7841574F7132307661545575482B2F33567279375A6E327959576B7547766676414D4C7832594C4E567471797359304A796355714478504549594C4D5964474E374B70614857503230744551417A324951686947624B39512F61505471725470364F484F54614175535773494D796A636866374831446751682B4A693069384C426864664D7841483052453779587171326E4A71792B4834682F446C5155516B524753384B594F46755352565242616E56344138645944717243767662776E2B4238704F7378325061306F77344D65674B59446868715A5556594C6E42734E4D6235474138656A50476835504C626D646D615631785276676A4543484B656732746F586F7053517954463438485547504C75526976426279596C58586D625870435336674251566842613251642F545535666E2B666E54507846795868694963314E364E6F615A666E7967556B4677466F2F72696C3347536937534D6A716D3478677158634479324B7144776554714E52666653364B326C30576B68337359724F5A68367041434254312F54534369664B48377274413879754433612F31724D754A37705A4E56546467616F6F583053317845304A4752573066595971534A6F4B38627935576A30362B2F586574354C317A746E31563174746C4251336F714B694C595350436B67504445346A47424D534D7977384870336C712F6957386C314A38384C624F6D546D6D657548547634623934356852534A426B325179623649526B4D6D7978447676484667743250747A5A736D6A6E594C2B375654622B52476D5030716B393954576A3049785754426633614B626E794730762B6C556E507163324A335A366333794755782B6C536E66716377684732324F77516433436E4E3868704D6670557033366D4D6845634B65442F384155505446662F6137683339546331754E6A305550767239506F6C474175436C362F4668664137744C723561624C4B7457526F794468776F6364786B5834625839757252725A7748357A466C644F6361786A673244672B6F51626E4678615141596870364A4C7A516A653665456A314B6C484F667558317A6C756E4F6535376E756B3678305A71432B676665483856634D4353394F5870307469754E41663468696846415177475878444A66706A59777A78326577517534465455474B6E525A3872436D54576F70437566693836744F3250504C7A4D4D735943644C2B32516F495A647463704F383354706D357656424541555867626C756F62784B71574C52746A6D776E4C694B46384233475266473635354839485A7A4E35366E76377547376833626C4D4846794D51626F6C685434537A3230624D5A334E325565724176533465304B434231575436647375706F634D43384B49332F69777157505A2F526C665A55356D6E4664514366574F4C436874324F4C71744850586E387A526C44635161434E2F756F796C58746A387A75787A6B6C4A616E532F594C2B4166536C6B6E4F7A756F334E39783268757845495870392F72345331387458526F36354E6276516E6F2F6D68662B363070416F3047457664336D41444356583553616E3633325479317177764C78527761684C6D4B377366376E4150786F2F504F5761654B317259505A41552B673238584C397A6E4A5163725033336B4F33365065626D6C396A57505A6D5348744279485A794B6165687546714C4F4E733862364D6837506368794B766355307334443631526A69412F6D723266565872366D364944376456664E6A795673484969504650722F5A346B72762F643344765038416B62744E327476434938553850396E32533550394C7548657431534E7A3476504B2B724B6B592F7247667039445A444130496A78547778384832432F53376833696C2B52756252552B7473583251465044312F2F414A7673464B566E73716F6432366344663937706151596144312B51354A64482B795A6C6C6738555A4535495A4B4E4D4F4A4647596B3441596F43462B2F59557649546266643564644A5338353973334B37633733562F4639582F316D54434659597A546572305A76437743494C43684D3462446B356848676D347954312B37787671776B775A2F7973454B7258506539324A3732666A636F6C495A554556444468454B6338523056755476636D774B676E753147584F5031456F566D3872573855564E43704A376E6464396536335470627058715A3236334D356271573664367263376E646571334F354D323348797A396479463066453949656A366F4370624879626A644351344B59666635784234474969644F535642312B2B66344A5A6374627257634D4C347751766A5152693152435749794C69516E674A6A657778506B476F6B347369572F763955705939466A6D3454533878687968364C334355777668757641536B4344466E5258656E523441783876434E4C4B52567556436B2F50425475723174304963457558336E7069634A6F516C6F56354F6E675369676534754141433638704C556D3158732B7A6E5A6A71623248387946664D32454A4542512B3858554A464167514E3966482B6255367A54697362624277446A41414C6547346D4C766679632F546E356E507875746531446150494969695278714C693071564F70567544554A345771463538597A6357486957556B35756C564C7A4F666C617459316A487349456B4F47716368536E4E714B31374D374E44486352596C682B7935664B726157734D315951754665567268565855536972734B51584A743850787072747A4F6E72646B314968506852475357626154737232623050792B35774954506F795731546C6B7935476B32353565445975312B335657324B7A73345A2F45506144584652796F336478626574366B5A4D34464951346668354A495A3373506863436C2F766D56434A784438724D4E3435534B77513279656E4A566F72387A42644743692B6C7A67714669695337536358503267592B6A5432596D73304D41393062786D365856543758646A3267614A4169393445585A7071364C584F32716D7735643335396E30436C684E696A674F326F767A5850497349506D686564334B5A4C4A546A516D4C48626B645632366D6D4E486F38724C79713553304C6366526F367250745A3772414F4B4F46694C347273376D72787474693850632F465864457035586566552B79786D784F7347334E38583355524F2F39764E534644595065666667676F4D377749786E7278354B6E374F626F5075674B5962774546426856324242755862746537464F3137632F61663550383975767430795A764C425552476850762F6451686371446F45624A69526B596B4E386552565352756E33747A30632B6554355457792B4D3953694149636B676236303744367957623754344D6361424E75694B4F3473426F477948597A726F454D4D577273615031676F45736A794D325643745069564E70306C35544D54342B4D627A4570573672337A753179647030744949674F4B45415159713237533675782B4A7A737530326F512F5A41454C79465930436C78455979464B63476F59596D4B477763414146456F79596C3736596B4A524B716E43644D655243746B37486E7162596735414C58414E74572B6F357249794F69534E43334B69746757456349496F66424D4B746F745178523474614F655A49792F797A54704C68512B62764A693343356D38635234676954784742776C4D6F7951784A6F73446646304E42363054754770705638474D586F6C4A754A6D6E6848424778516933427855486179424178644749756F507754526953486D5075472B472F645569684569313157474744434835333470733336544277464F596A55386F6F466F73454D55514C6851344834474C7977354B795039395A354D4B662B72435979397243463377736D31374A75736444362F4D63304F4E66586F6A6D6A345964665977775244306746445365636C6E6A59734B6548543462714E51446A4A516E4A495A496833715A626E644A64373349716536636D70756C7558376C7A6E5066756E376C3739773764544B494F42516A78626A39766A3375327272732B78706E42774B395A75554D4B78565074313471336257567364544E4742465162767039527A336F51732B77576F684344324E345A38484356534F70424B516A55735A5338394D46436345706F644A5A524F564B5864756E7A335743623362702B3633553979376533793954755A506C756E37737645516A30756A3934466855326C79564E6852706A796A654574764E66545A396554726255706535532F654C6C452B466A65557568324C72644A7A736A5345496C634E3164756C32623056363558716B4D49442F4E51457847705068334D75683873712B48325731412B7144372B4B4B7847586B393073557031614B7339736D44696B4E4366636B7971377070594663347055726E4671796335306E465279393733626C534F7A4F633537705734366E50633578656D484B47384244514C554C64697A5A73556E354E545A44392F4B7A3871456C523046654C4344514469347741446E5650632B6454334F6339324F62724876314E5763627759597A6838636D5872557544516868516E49353736314A44796542347A694742346A445067304A416F2F776E6F673530703461494543637675594474565A586C36736A625951497566654B7031614B362B657A553279586961465171757A636D5968346C4669337954367233552B53363375636E564B39387656626A6453652F6362747A6E4F6536626E75334F37647574787559324A7A6A43446A49625258746F374D543278656577536677386B4530425A694D714E6B4E3152566276682B4F4445684445496E4554567365334D454739694D3279646C384C6F336A486C3266584E2B4C466B595A5973694F496933394F3075703753455948416F76332B355A342F546F394F746F525842674C4562774C376447624E56696658706148566C4651447171374651497563313474566A797632746532704C78496E312F6A50532F61757975625463627065364E2F4669724B764F37613262524F494C7852674F75554D46473257342F5274706430416B674372704F6470656E7865616470666A313972544568304F4B6967716B6D67376C75774964474A475A4B4C46336A4A615746476E4C73356D39432B46366F5742714549535172476E416F61352B326A306157743167664167716865564336675A77724472796950762F414D346D58576164657133374D374D34684E346749347151686F766542415A345339517848327A6F7146744C6A516B38504942446D685968773743755939566F705A44682F424175625858322B6D316F6E6A78416545744A434753736733474E4C676C68443161655552446646526B30712F7953666D37616E73516C37777066764751586E374A31503156315932314E7A767A395039317476454C41516B4367415059773875355977373131727A566130654F432F6F7178775145505547704963386B77784D534D7954706751386A4C5130636C6B3367716C734A31503737664E584E68376952775339454663527046786C55694E57674D324F6C6D52784955554E41437A555A4E4442654C684C564A68534B644D6662584C453133467A5A7476375449515868524738584B4A4367686D323157577162496454624C2B5A4346746B303269596445472B623775743136787675397A6C2B30336E2F496430573564544A766D302B4B634F487939332F7052366D34514832326E56746F5A467A794E5259547174797A6D3762477A734E7A427A314544437571754E7A6E7930396656586B62554B2F654C674F796F30442B334879663533543536374A3433567461495967656734414D63505344564467516C7261454563446F46497464736D396348386C36484C376E48584B4A6E6A3764475732637261326B3365432F37774C43766C57585654646A326E5736585732704475436D47384248435839626E5A4B3955744C32635264593752324D684E7852455247734A44506469516145476C4B5733377138373762754B314637785163446373756D56746B397568735150786A4878742B336F723944625951493839657A3636396656717635622B6A324D51474968346741546F443331506A39554C4A66763451784243794937434F4742526A6E3377416A375A507463372B79366464726E61685955464645724C545159667764506E7043366E5065394A447478756A6C47506B3731583758634F647574306C616E796C756656667470376E6375632B707854372B357A74344343784470656962724A79717A5A6138625A6538506B353777776D7A46713535383032694A3342704765414D52414A704547634F4773577051753764686173724A54302F49454751694A41496479575A34636E61776F62355563765859743455525A664B365561385A63633544694D776563506B363270376E5032633749305A3979395A4745727152716E6E3833564656613632765A316A57774F6D397A6E766C57374A36572F6731626D6467734F2F53566864376158616E6262634F4B74342F45444534514F6B413743726D7041446E504D65476971784D4B4E36384F414E796C7158754F376252343878764E624C4C70366E4E746B5051584B792F6A53325646325A514244395A2B6A4A7174736F333938393039306E31507431763235737259317A68636A2B5A2F6E5A755132447732544169424D565158626879394E644A5475332B507A337573774C41304671446357416F2F4A736F3852385030736A7971384B534951524F552F7A444E504F2F4A7A79314F775149436C3835592B6A626170737351497562697238315750624C5A7A31747154415039343537656964666D3758584B4753454C6445414D4742455455374171564648464553596F69584A4E53546571315068476C2B723079652F52505133726542374E585A755751657A5632626C757279736C74673276624D3973375A57454C445A4E75424F397633472B377263756D2B7838334F66617959366E752F6D55656D6E756638344A7472366E4D37596A65416C482F6D506E5A4D6D3844342F774244782F744B6B453453662B4142376678584D36692F48723757544A764D3738334166316C6468754F493855302F6275325273562F6877336247396B7962365A6A6766474663575549385275313962596966384946365864724A6B33694834497533774339513335663151724E2F6C763650593256375732794D6D5466534C4C2F5A2F61764B31416A7766582F655A76702B782B6C33567557544A6E6F666D2F69506B7577334845654B3270682F444F2F377A75707A5A6D2F2B4137726245396B795A46635449336A77682B682F2F4579336A77682B682F3841784D6D54436A313632562F4C663065786B79595174674D2F683931742F4765795A4D6D6B454C2F2F32515C75303033645C7530303364222C226361726456657273696F6E223A22222C22636869704E6F223A22222C22636974697A656E4944223A22222C22646174654F664269727468223A22222C22656E6344617461223A2232303233313130373934363138353339435564415151336B564E49324252524C6278526B633654326A732F68693834443965684935327A2F4C3938784253733053703031746A51452B4C61327750414C516C44474D487237703557655C6E74494B4C62373173393634433875466B6F717A34344A336F617947435158554174634D2F637854796E5559472B614E6E4448524A554638534A7A4243686C58466156505147723254454D76475C6E646835753642396D4E6D4B5A7274797737554257426E4E4966793777304F6B6A4869782F4C6F75483949776F5A7676633139494A6B79466E77576B42666D654355435065626A4C31693166565C6E7834736B70362B35584E6142422B6971775061486879637655474135362B704A477751714572426F6F715879324B727A484E3854312F5A61322F674D73666237652B4D454833392B583841525C6E566F3062473067455A41565352534456654976314F644A7A66366C5464364A584A486D7364772F4C5255554253334E58624658524A7570413038576950705A7733637534727446624A4B4F545C6E667A5965533175653431304245766733744C696549697173725346786C7A4E584C556450316E76303046354B4D4A6C737232773449437736413156695A69495569744C4B63333436467148785C6E52673037433278302F4A4E6469334F384C4D32306675767247724C7339324B2F4E655933776654644763544E584845696E744B787666537645766638496339725178726B4541527A526A47415C6E7762597A7449714C3063516A697369396B4766457935476B6A64574E4461496E7476575777317669516352546650774E2F59462F31673232572B3935345A715274467446634A35656E4342365C6E75486A7876486B6E796D426D337777794B352B4C48416C473464686C5452494D4D56435A41315446665A424E52666B78304B496D736B66426F2F4A472F586E69592B51576C7877502B6F68735C6E72527750574276344D6951456D4E66364C544467375145314C3271397667622B2B37356F2F6B4839585A39576D576B596F5334376B4F62784E492F43567272324A50423043557759456530395C6E51513850643754354444794D4B2F5042346C556975342F326367445650676E334378507945794C546C2F2F5A5949496E39576B433151503834614670504265766B5346454C682F52585A466C5C6E317052472B473964547A50364667524A512F493369796F41484A31716839704251454D337171536C477A454638756432665947476642715470692F48473345416261344D2B7A2F37486F72345C6E394E544772724A6B6A784F4E52316F36534C72716434726F53696D4D306434635A70366C686F6A556F4251343576364A67796472386A566A536E4353466B6D534366624D6365344F365234355C6E68416C7633776F5564485172356F64364543633876344E6E6178474E666244693649674379434F4A4738467A624236364B4F374D6861576D4C415C75303033645C75303033645C6E222C2265787069726544617465223A22222C2266756C6C4E616D65456E223A22222C2266756C6C4E616D655468223A22222C2267656E646572223A22222C22697373756544617465223A22222C22697373756572436F6465223A22222C226973737565724E616D65223A22222C226C617365724E6F223A22222C226D6964223A222D222C226E756D626572556E646572496D616765223A22222C22726571756573744461746554696D65223A2232303233313130372031353A32323A3234222C227465726D696E616C4964223A22444947494F30303031227D1C03BB
33. Inquiry QR Payment (Transaction Code = IQ)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| NA | NA | NA | NA |
Example Request : 02001836303030303030303030313149513030301C0329
EDC sends data to POS (EDC -> POS)
The response will be the same original wallet type Please reference Transaction Code = 70
34. Cancel QR Payment (Transaction Code = CQ)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| NA | NA | NA | NA |
Example Request : 02001836303030303030303030313143513030301C0323
EDC sends data to POS (EDC -> POS)
Example Response : 02006336303030303030303030313143514E44311C303200405472616E732043616E63656C6C6564202020202020202020202020202020202020202020202020201C031C
ETAX Transaction
Implement Guildeline
- Etax is the transaction which POS can do Electronics TAX with the ETAX Server over EDC
- POS needs to send command to EDC using the below command to action with ETAX Server
- POS needs to implement ETAX data block using ETAX Server specification which in JSON Format and used the built data as field ET to send to EDC
- All ETAX based command, start text will change to 82 and Lenght of Message / Field must be in Base16 (Example 1000 bytes = 03E8)
- If Etax is enabled, EDC will required POS to inquiry etax status before settlement is performed. Or EDC cannot do settlement.
- When POS inquiry ETAX Transactions, POS should repair the failed data with create etax or void etax. Or even manual repair on etax web portal.
E-TAX:1. Sale Credit + Etax (Transaction Code = EA)
When EDC received the command EA - Sale Credit + Etax, This mean POS want to do Sale and Etax together in 1 transaction POS should send information to create ETAX in tax ET and EDC has 3 options to fill in Customer information
- Full information from pos under ET field (Completed Etax Data)
- Read Thai Id Card at EDC
- Customer fill in later (EDC will generates the QR Code at the end of the process)
The Transaction (Sale) will be completed and send the result to the POS. And Etax will be uploaded after that with No further response to POS. POS should send Inquiry to retreive the etax data using command EJ later before doing Settlement.
- Sale+Etax Full info
- Sale+Etax Dip Chip
- Sale+Etax QR
| Field Type | Attribute | Length | Data | Example | |
|---|---|---|---|---|---|
| 40 | ANS | 12 | Amount Transaction | Ex. 000000001000 = 10. 00 | |
| R1 | ANS | 20 | Reference 1 | **Optional | |
| R2 | ANS | 20 | Reference 2 | **Optional | |
| U1 | ANS | 20 | Unique ID | Use for Transaction Reference between EDC and POS Example Format : YYYYMMDDHHmmss + Random 6 digits |
|
| RESERVED FOR VAT REFUND | |||||
| V1 | ANS | 10 | VAT Amount | **Optional Ex. 000000001000 = 10. 00 |
|
| V2 | ANS | 10 | Tax Allowance | **Optional Ex. 000000002000 = 20. 00 |
|
| V3 | ANS | 20 | Merchant Unique Value | **Optional |
|
| V4 | ANS | 6 | Campaign Type | **Optional |
|
| AR | ANS | ..999 | BIN Range (Array) | **Optional Use for checking if this field present, the input PAN will be validated if the BIN of PAN contains the BIN range sent |
|
| J6 | ANS | 2 | Bank ID | ** Optional, if value is presented and not be 00, EDC will prompt for the selected bank 04 |
|
| PI | ANS | 2 | Payment Indicator | **Optional Payment method indicates to be proceed. |
|
| ET | ANS | ..65535 | ETAX Data Block | Completed ETAX Data Block generated by POS regards of the Etax Specification |
Example Request : 820AFC36303030303030303030313032303030311C3430000C3030303030303030303130301C45540AD47B0D0A202020202264617461223A207B0D0A202020202020202022646F63756D656E745F747970655F6E6F223A2022543031222C0D0A202020202020202022696E766F6963655F6E756D626572223A20224150493338382D303031222C0D0A2020202020202020227461785F6964223A202230313035353331303731393831222C0D0A2020202020202020226272616E63685F636F6465223A20223030303030222C0D0A20202020202020202262757965725F74797065223A202254584944222C0D0A20202020202020202262757965725F7461785F6964223A2022313233343536373839303132333030303030222C0D0A20202020202020202262757965725F6E616D65223A20223F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202262757965725F656D61696C223A2022656D61696C6E616D65406D61696C2E636F2E7468222C0D0A20202020202020202262757965725F656D61696C5F6363223A2022222C0D0A20202020202020202262757965725F7A6970636F6465223A20223130313330222C0D0A20202020202020202262757965725F636F756E747279223A20225448222C0D0A20202020202020202262757965725F616464726573735F31223A2022333139203F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F203236203F3F3F3F20312D32222C0D0A20202020202020202262757965725F616464726573735F32223A20223F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202263757272656E6379223A2022544842222C0D0A202020202020202022616D6F756E74223A202235303030302E3030222C0D0A2020202020202020227461785F636F64655F74797065223A2022564154222C0D0A2020202020202020227461785F72617465223A202237222C0D0A2020202020202020227461785F616D6F756E74223A202235303030302E3030222C0D0A2020202020202020226665655F616D6F756E74223A2022302E3030222C0D0A202020202020202022646973636F756E745F616D6F756E74223A20223230302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F6265666F72655F746178223A202234393830302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F746178223A2022333438362E3030222C0D0A202020202020202022746F74616C5F616D6F756E74223A2022313039303932312E3030222C0D0A2020202020202020227061796D656E745F636F6E646974696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F203330203F3F3F222C0D0A2020202020202020226475655F64617465223A2022222C0D0A202020202020202022736176655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E6365223A2022504F31323334222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F636F6465223A20225A5A5A222C0D0A202020202020202022646F63756D656E745F726561736F6E223A2022222C0D0A202020202020202022646F63756D656E745F726561736F6E5F636F6465223A2022222C0D0A2020202020202020226E6F7465223A2022222C0D0A2020202020202020226578706F72745F64617465223A2022323032302D30312D32315431383A34393A3030222C0D0A2020202020202020227064665F70617373776F7264223A2022222C0D0A20202020202020202270726F6475637473223A205B0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F2D3F3F3F3F3F3F3F3F3F3F3F3F3F3F203031222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022333030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223231302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A2022363030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A2022363432302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F203032222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A202231373030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A2022313139302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202233343030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202233363338302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F20652D546F6B656E2035313133222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022353030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223335302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202231303030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202231303730302E3030220D0A2020202020202020202020207D0D0A20202020202020205D0D0A202020207D2C0D0A20202020227064665F74656D706C617465223A202264656661756C74222C0D0A2020202022656D61696C5F74656D706C617465223A202264656661756C74222C0D0A202020202275706C6F61645F74797065223A20226E6577222C0D0A20202020226A6F625F636F6465223A20224B3032222C0D0A202020202263616C6C6261636B223A207B0D0A20202020202020202275726C223A2022222C0D0A20202020202020202266696C65223A2022504446220D0A202020207D0D0A7D1C03D6
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example | |
|---|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | ||
| D0 | ANS | 96 | Merchant Name and Address | ||
| 03 | N | 6 | Transaction Data(YYMMDD) | ||
| 04 | N | 6 | Transaction Time(HHMMSS) | ||
| 01 | ANS | 6 | Approval Code | ||
| 65 | ANS | 6 | Invoice No. (Trace No. ) | ||
| 16 | N | 8 | Terminal ID | ||
| D1 | ANS | 15 | Merchant ID | ||
| D2 | ANS | . . 20 | Card Issuer Name | ||
| 30 | N | . . 40 | Primary Account Number (Card Number) If the payment proceeded by QR, this field may replaced with trans id (maximum 40 chars) instead of card number |
||
| 31 | N | 4 | Card Expiry Date(YYMM) | ||
| 50 | N | 6 | Batch No. | ||
| D3 | ANS | 12 | Reference No. | ||
| 40 | ANS | 12 | Transaction Amount (Original) | ||
| D5 | ANS | 26 | Card Holder Name | ||
| R1 | ANS | 20 | Reference 1 | **Optional | |
| R2 | ANS | 20 | Reference 2 | **Optional | |
| U1 | ANS | 20 | Unique ID | **Optional Use for Inquiry message Format : YYYYMMDDHHmmss + Random 6 digits |
|
| J6 | ANS | 2 | Bank ID | **Optional Returns the bank that belongs to the proceed transaction 04 |
|
| PI | ANS | 2 | Payment Indicator | **Optional Payment method proceeded, may absent if request is absent and was indicated to full payment |
|
| 4F | N | 12 | Discount Amount 1 | ** Optional PI = 01, this field indicates to UPlan discount amount. Only response when PI is presented |
|
| 4E | N | 12 | Discount Amount 2 | ** Optional PI = 00 or 01, this field indicates to Instant discount amount. Only response when PI is presented |
|
| 4A | N | 12 | Net Amount | ** Optional Only response when PI is presented |
|
| CY | N | 3 | Currency Code | **Optional If payment indicator is presented, the value of the field will be the currency of the Transaction Amount (Net). Please refer to ISO 4217 Only response when PI is presented |
|
| TI | ANS | ..32 | Tax invoice number |
Example Response Success : 8201C136303030303030303030313132303030311C30320028535543434553532020202020202020202020202054455354204C494E4520322020202020202020201C4430004542616E676B6F6B2020202020202020202020202020202054455354204C494E45203220202020202020202020202054455354204C494E4520332020202020202020202020201C303300063232303932361C303400063231303332331C303100063030303030301C363500063030303031301C3136000831323334353637381C4431000F3132333435363738393031323334351C4432000A564953412020202020201C3330003831323334353637383930313233343132333435363738393031323334313233343536373839303132333431323334353637383930313233341C33310004303232301C353000063130202020201C4433000C3130303020202020202020201C3430000C3030303030303030313030301C4435001A4A6F686E20446F652020202020202020202020202020202020201C5231001431323334353637383930202020202020202020201C5232001431323334352020202020202020202020202020201C544900123030303030303030303030303030303030311C035F
E-TAX:2. Sale Wallet + ETAX (Transaction Code = EB)
This command is for Wallet Transaction such as Thai QR, Alipay and WechatPay
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 40 | ANS | 12 | Amount Transaction | Ex. 000000001000 = 10. 00 |
| A1 | ANS | 2 | AliPay = 01 WeChat = 02 Thai QR Payment = 03 QR Credit = 04 |
|
| R1 | ANS | 20 | Reference 1 | **Optional |
| R2 | ANS | 20 | Reference 2 | **Optional |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| OPTIONAL FOR VAT REFUND ** อนาคตอาจจะใช้ | ||||
| V1 | ANS | 10 | VAT Amount | **Optional Ex. 000000001000 = 10. 00 |
| V2 | ANS | 10 | Tax Allowance | **Optional Ex. 000000002000 = 20. 00 |
| V3 | ANS | 20 | Merchant Unique Value | **Optional |
| V4 | ANS | 6 | Campaign Type | **Optional |
| ET | ANS | ..65535 | ETAX Data Block | Completed ETAX Data Block generated by POS regards of the Etax Specification |
Example Request Alipay : 820B0436303030303030303030313045423030311C343000123030303030303030313030301C4131000230311C5531001432303233303531353031323134353438343030391C45540AD47B0D0A202020202264617461223A207B0D0A202020202020202022646F63756D656E745F747970655F6E6F223A2022543031222C0D0A202020202020202022696E766F6963655F6E756D626572223A20224150493338382D303031222C0D0A2020202020202020227461785F6964223A202230313035353331303731393831222C0D0A2020202020202020226272616E63685F636F6465223A20223030303030222C0D0A20202020202020202262757965725F74797065223A202254584944222C0D0A20202020202020202262757965725F7461785F6964223A2022313233343536373839303132333030303030222C0D0A20202020202020202262757965725F6E616D65223A20223F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202262757965725F656D61696C223A2022656D61696C6E616D65406D61696C2E636F2E7468222C0D0A20202020202020202262757965725F656D61696C5F6363223A2022222C0D0A20202020202020202262757965725F7A6970636F6465223A20223130313330222C0D0A20202020202020202262757965725F636F756E747279223A20225448222C0D0A20202020202020202262757965725F616464726573735F31223A2022333139203F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F203236203F3F3F3F20312D32222C0D0A20202020202020202262757965725F616464726573735F32223A20223F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202263757272656E6379223A2022544842222C0D0A202020202020202022616D6F756E74223A202235303030302E3030222C0D0A2020202020202020227461785F636F64655F74797065223A2022564154222C0D0A2020202020202020227461785F72617465223A202237222C0D0A2020202020202020227461785F616D6F756E74223A202235303030302E3030222C0D0A2020202020202020226665655F616D6F756E74223A2022302E3030222C0D0A202020202020202022646973636F756E745F616D6F756E74223A20223230302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F6265666F72655F746178223A202234393830302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F746178223A2022333438362E3030222C0D0A202020202020202022746F74616C5F616D6F756E74223A2022313039303932312E3030222C0D0A2020202020202020227061796D656E745F636F6E646974696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F203330203F3F3F222C0D0A2020202020202020226475655F64617465223A2022222C0D0A202020202020202022736176655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E6365223A2022504F31323334222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F636F6465223A20225A5A5A222C0D0A202020202020202022646F63756D656E745F726561736F6E223A2022222C0D0A202020202020202022646F63756D656E745F726561736F6E5F636F6465223A2022222C0D0A2020202020202020226E6F7465223A2022222C0D0A2020202020202020226578706F72745F64617465223A2022323032302D30312D32315431383A34393A3030222C0D0A2020202020202020227064665F70617373776F7264223A2022222C0D0A20202020202020202270726F6475637473223A205B0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F2D3F3F3F3F3F3F3F3F3F3F3F3F3F3F203031222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022333030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223231302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A2022363030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A2022363432302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F203032222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A202231373030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A2022313139302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202233343030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202233363338302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F20652D546F6B656E2035313133222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022353030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223335302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202231303030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202231303730302E3030220D0A2020202020202020202020207D0D0A20202020202020205D0D0A202020207D2C0D0A20202020227064665F74656D706C617465223A202264656661756C74222C0D0A2020202022656D61696C5F74656D706C617465223A202264656661756C74222C0D0A202020202275706C6F61645F74797065223A20226E6577222C0D0A20202020226A6F625F636F6465223A20224B3032222C0D0A202020202263616C6C6261636B223A207B0D0A20202020202020202275726C223A2022222C0D0A20202020202020202266696C65223A2022504446220D0A202020207D0D0A7D1C03CE
Example Request Wechat : 820B0436303030303030303030313045423030311C343000123030303030303030313030301C4131000230321C5531001432303233303531353031323134353438343030391C45540AD47B0D0A202020202264617461223A207B0D0A202020202020202022646F63756D656E745F747970655F6E6F223A2022543031222C0D0A202020202020202022696E766F6963655F6E756D626572223A20224150493338382D303031222C0D0A2020202020202020227461785F6964223A202230313035353331303731393831222C0D0A2020202020202020226272616E63685F636F6465223A20223030303030222C0D0A20202020202020202262757965725F74797065223A202254584944222C0D0A20202020202020202262757965725F7461785F6964223A2022313233343536373839303132333030303030222C0D0A20202020202020202262757965725F6E616D65223A20223F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202262757965725F656D61696C223A2022656D61696C6E616D65406D61696C2E636F2E7468222C0D0A20202020202020202262757965725F656D61696C5F6363223A2022222C0D0A20202020202020202262757965725F7A6970636F6465223A20223130313330222C0D0A20202020202020202262757965725F636F756E747279223A20225448222C0D0A20202020202020202262757965725F616464726573735F31223A2022333139203F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F203236203F3F3F3F20312D32222C0D0A20202020202020202262757965725F616464726573735F32223A20223F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202263757272656E6379223A2022544842222C0D0A202020202020202022616D6F756E74223A202235303030302E3030222C0D0A2020202020202020227461785F636F64655F74797065223A2022564154222C0D0A2020202020202020227461785F72617465223A202237222C0D0A2020202020202020227461785F616D6F756E74223A202235303030302E3030222C0D0A2020202020202020226665655F616D6F756E74223A2022302E3030222C0D0A202020202020202022646973636F756E745F616D6F756E74223A20223230302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F6265666F72655F746178223A202234393830302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F746178223A2022333438362E3030222C0D0A202020202020202022746F74616C5F616D6F756E74223A2022313039303932312E3030222C0D0A2020202020202020227061796D656E745F636F6E646974696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F203330203F3F3F222C0D0A2020202020202020226475655F64617465223A2022222C0D0A202020202020202022736176655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E6365223A2022504F31323334222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F636F6465223A20225A5A5A222C0D0A202020202020202022646F63756D656E745F726561736F6E223A2022222C0D0A202020202020202022646F63756D656E745F726561736F6E5F636F6465223A2022222C0D0A2020202020202020226E6F7465223A2022222C0D0A2020202020202020226578706F72745F64617465223A2022323032302D30312D32315431383A34393A3030222C0D0A2020202020202020227064665F70617373776F7264223A2022222C0D0A20202020202020202270726F6475637473223A205B0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F2D3F3F3F3F3F3F3F3F3F3F3F3F3F3F203031222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022333030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223231302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A2022363030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A2022363432302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F203032222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A202231373030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A2022313139302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202233343030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202233363338302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F20652D546F6B656E2035313133222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022353030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223335302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202231303030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202231303730302E3030220D0A2020202020202020202020207D0D0A20202020202020205D0D0A202020207D2C0D0A20202020227064665F74656D706C617465223A202264656661756C74222C0D0A2020202022656D61696C5F74656D706C617465223A202264656661756C74222C0D0A202020202275706C6F61645F74797065223A20226E6577222C0D0A20202020226A6F625F636F6465223A20224B3032222C0D0A202020202263616C6C6261636B223A207B0D0A20202020202020202275726C223A2022222C0D0A20202020202020202266696C65223A2022504446220D0A202020207D0D0A7D1C03CD
Example Request ThaiQR Payment : 820B0436303030303030303030313045423030311C343000123030303030303030313030301C4131000230331C5531001432303233303531353031323134353438343030391C45540AD47B0D0A202020202264617461223A207B0D0A202020202020202022646F63756D656E745F747970655F6E6F223A2022543031222C0D0A202020202020202022696E766F6963655F6E756D626572223A20224150493338382D303031222C0D0A2020202020202020227461785F6964223A202230313035353331303731393831222C0D0A2020202020202020226272616E63685F636F6465223A20223030303030222C0D0A20202020202020202262757965725F74797065223A202254584944222C0D0A20202020202020202262757965725F7461785F6964223A2022313233343536373839303132333030303030222C0D0A20202020202020202262757965725F6E616D65223A20223F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202262757965725F656D61696C223A2022656D61696C6E616D65406D61696C2E636F2E7468222C0D0A20202020202020202262757965725F656D61696C5F6363223A2022222C0D0A20202020202020202262757965725F7A6970636F6465223A20223130313330222C0D0A20202020202020202262757965725F636F756E747279223A20225448222C0D0A20202020202020202262757965725F616464726573735F31223A2022333139203F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F203236203F3F3F3F20312D32222C0D0A20202020202020202262757965725F616464726573735F32223A20223F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202263757272656E6379223A2022544842222C0D0A202020202020202022616D6F756E74223A202235303030302E3030222C0D0A2020202020202020227461785F636F64655F74797065223A2022564154222C0D0A2020202020202020227461785F72617465223A202237222C0D0A2020202020202020227461785F616D6F756E74223A202235303030302E3030222C0D0A2020202020202020226665655F616D6F756E74223A2022302E3030222C0D0A202020202020202022646973636F756E745F616D6F756E74223A20223230302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F6265666F72655F746178223A202234393830302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F746178223A2022333438362E3030222C0D0A202020202020202022746F74616C5F616D6F756E74223A2022313039303932312E3030222C0D0A2020202020202020227061796D656E745F636F6E646974696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F203330203F3F3F222C0D0A2020202020202020226475655F64617465223A2022222C0D0A202020202020202022736176655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E6365223A2022504F31323334222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F636F6465223A20225A5A5A222C0D0A202020202020202022646F63756D656E745F726561736F6E223A2022222C0D0A202020202020202022646F63756D656E745F726561736F6E5F636F6465223A2022222C0D0A2020202020202020226E6F7465223A2022222C0D0A2020202020202020226578706F72745F64617465223A2022323032302D30312D32315431383A34393A3030222C0D0A2020202020202020227064665F70617373776F7264223A2022222C0D0A20202020202020202270726F6475637473223A205B0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F2D3F3F3F3F3F3F3F3F3F3F3F3F3F3F203031222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022333030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223231302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A2022363030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A2022363432302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F203032222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A202231373030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A2022313139302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202233343030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202233363338302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F20652D546F6B656E2035313133222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022353030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223335302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202231303030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202231303730302E3030220D0A2020202020202020202020207D0D0A20202020202020205D0D0A202020207D2C0D0A20202020227064665F74656D706C617465223A202264656661756C74222C0D0A2020202022656D61696C5F74656D706C617465223A202264656661756C74222C0D0A202020202275706C6F61645F74797065223A20226E6577222C0D0A20202020226A6F625F636F6465223A20224B3032222C0D0A202020202263616C6C6261636B223A207B0D0A20202020202020202275726C223A2022222C0D0A20202020202020202266696C65223A2022504446220D0A202020207D0D0A7D1C03CC
Example Request QR Credit : 820B0436303030303030303030313045423030311C343000123030303030303030313030301C4131000230341C45531001432303233303531353031323134353438343030391C5540AD47B0D0A202020202264617461223A207B0D0A202020202020202022646F63756D656E745F747970655F6E6F223A2022543031222C0D0A202020202020202022696E766F6963655F6E756D626572223A20224150493338382D303031222C0D0A2020202020202020227461785F6964223A202230313035353331303731393831222C0D0A2020202020202020226272616E63685F636F6465223A20223030303030222C0D0A20202020202020202262757965725F74797065223A202254584944222C0D0A20202020202020202262757965725F7461785F6964223A2022313233343536373839303132333030303030222C0D0A20202020202020202262757965725F6E616D65223A20223F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202262757965725F656D61696C223A2022656D61696C6E616D65406D61696C2E636F2E7468222C0D0A20202020202020202262757965725F656D61696C5F6363223A2022222C0D0A20202020202020202262757965725F7A6970636F6465223A20223130313330222C0D0A20202020202020202262757965725F636F756E747279223A20225448222C0D0A20202020202020202262757965725F616464726573735F31223A2022333139203F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F203236203F3F3F3F20312D32222C0D0A20202020202020202262757965725F616464726573735F32223A20223F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202263757272656E6379223A2022544842222C0D0A202020202020202022616D6F756E74223A202235303030302E3030222C0D0A2020202020202020227461785F636F64655F74797065223A2022564154222C0D0A2020202020202020227461785F72617465223A202237222C0D0A2020202020202020227461785F616D6F756E74223A202235303030302E3030222C0D0A2020202020202020226665655F616D6F756E74223A2022302E3030222C0D0A202020202020202022646973636F756E745F616D6F756E74223A20223230302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F6265666F72655F746178223A202234393830302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F746178223A2022333438362E3030222C0D0A202020202020202022746F74616C5F616D6F756E74223A2022313039303932312E3030222C0D0A2020202020202020227061796D656E745F636F6E646974696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F203330203F3F3F222C0D0A2020202020202020226475655F64617465223A2022222C0D0A202020202020202022736176655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E6365223A2022504F31323334222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F636F6465223A20225A5A5A222C0D0A202020202020202022646F63756D656E745F726561736F6E223A2022222C0D0A202020202020202022646F63756D656E745F726561736F6E5F636F6465223A2022222C0D0A2020202020202020226E6F7465223A2022222C0D0A2020202020202020226578706F72745F64617465223A2022323032302D30312D32315431383A34393A3030222C0D0A2020202020202020227064665F70617373776F7264223A2022222C0D0A20202020202020202270726F6475637473223A205B0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F2D3F3F3F3F3F3F3F3F3F3F3F3F3F3F203031222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022333030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223231302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A2022363030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A2022363432302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F203032222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A202231373030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A2022313139302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202233343030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202233363338302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F20652D546F6B656E2035313133222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022353030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223335302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202231303030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202231303730302E3030220D0A2020202020202020202020207D0D0A20202020202020205D0D0A202020207D2C0D0A20202020227064665F74656D706C617465223A202264656661756C74222C0D0A2020202022656D61696C5F74656D706C617465223A202264656661756C74222C0D0A202020202275706C6F61645F74797065223A20226E6577222C0D0A20202020226A6F625F636F6465223A20224B3032222C0D0A202020202263616C6C6261636B223A207B0D0A20202020202020202275726C223A2022222C0D0A20202020202020202266696C65223A2022504446220D0A202020207D0D0A7D1C0361
EDC sends data to POS (EDC -> POS)
- If EDC got the request message from POS, EDC will send ACK message(0x06). but if EDC busy at the moment EDC will send NAK message(0x15)
- If payment process success EDC will return reponse as the table below.
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 96 | Merchant Name and Address | |
| 03 | N | 6 | Transaction Data(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| 01 | ANS | 6 | Approval Code | |
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| D2 | ANS | . . 20 | Card Issuer Name | |
| 30 | N | . . 40 | Primary Account Number (Card Number) | |
| 31 | N | 4 | Card Expiry Date(YYMM) | |
| 50 | N | 6 | Batch No. | |
| D3 | ANS | 12 | Reference No. | |
| D5 | ANS | 26 | Card Holder Name | |
| A1 | ANS | 2 | AliPay = 01 WeChat = 02 Thai QR Payment = 03 QR Credit = 04 |
|
| R1 | ANS | 20 | Reference 1 | |
| R2 | ANS | 20 | Reference 2 | |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| TI | ANS | ..32 | Tax invoice number |
Example Response Success [ThaiQR Payment] :
8201A636303030303030303030313145423030311C30320028535543434553532020202020202020202020202020202020202020202020202020202020202020201C4430004542616E676B6F6B20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020201C303300063232303932361C303400063231333434331C303100063030303030301C363500063030303031301C3136000831323334353620201C4431000F3132333435363738393031323334351C4432000A50524F4D5054205041591C3330000E31323334353637383930313233341C33310004303232301C353000063130202020201C4433000C3130303020202020202020201C4435001A4A6F686E20446F652020202020202020202020202020202020201C4131000230331C5231001431323334353637383930202020202020202020201C5232001431323334352020202020202020202020202020201C5531001432303233303531353031323134353438343030391C544900123030303030303030303030303030303030311C031A
E-TAX:3. Redeem E-Voucher + Etax (Transaction Code = EC)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 95 | ANS | 1 | Redeem Type | 1 = E-Voucher |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| J6 | ANS | 2 | Bank ID | ** Optional, if value is presented and not be 00, EDC will prompt for the selected bank 04 |
| ET | ANS | ..65535 | ETAX Data Block | Completed ETAX Data Block generated by POS regards of the Etax Specification |
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 93 | ANS | 12 | Net Sale Amount | 000000012345 = 123. 45 |
| 94 | ANS | 25 | Product Name | Fill with space |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| 97 | ANS | 12 | Redeem Amount | 000000012345 = 123. 45 |
| 98 | ANS | 9 | Balance Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| J6 | ANS | 2 | Bank ID | Returns the bank that belongs to the proceed transaction 04 |
| TI | ANS | ..32 | Tax invoice number |
E-TAX:4. Redeem E-Voucher+Credit + Etax (Transaction Code = EC)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 95 | ANS | 1 | Redeem Type | 2 = E-Voucher+Credit |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| ET | ANS | ..65535 | ETAX Data Block | Completed ETAX Data Block generated by POS regards of the Etax Specification |
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 93 | ANS | 12 | Net Sale Amount | 000000012345 = 123. 45 |
| 94 | ANS | 25 | Product Name | Fill with space |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| 97 | ANS | 12 | Redeem Amount | 000000012345 = 123. 45 |
| 98 | ANS | 9 | Balance Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| TI | ANS | ..32 | Tax invoice number |
E-TAX:5. Redeem Product + Etax (Transaction Code = EC)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 95 | ANS | 1 | Redeem Type | 4 = Discount % Fix Point |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| ET | ANS | ..65535 | ETAX Data Block | Completed ETAX Data Block generated by POS regards of the Etax Specification |
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 93 | ANS | 12 | Net Sale Amount | 000000012345 = 123. 45 |
| 94 | ANS | 25 | Product Name | Fill with space |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| 97 | ANS | 12 | Redeem Amount | 000000012345 = 123. 45 |
| 98 | ANS | 9 | Balance Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| TI | ANS | ..32 | Tax invoice number |
E-TAX:6. Redeem Discount % Fix Point + Etax (Transaction Code = EC)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 95 | ANS | 1 | Redeem Type | 4 = Discount % Fix Point |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| ET | ANS | ..65535 | ETAX Data Block | Completed ETAX Data Block generated by POS regards of the Etax Specification |
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 93 | ANS | 12 | Net Sale Amount | 000000012345 = 123. 45 |
| 94 | ANS | 25 | Product Name | Fill with space |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| 97 | ANS | 12 | Redeem Amount | 000000012345 = 123. 45 |
| 98 | ANS | 9 | Balance Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| TI | ANS | ..32 | Tax invoice number |
E-TAX:7. Redeem Discount % Var Point + Etax (Transaction Code = EC)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 95 | ANS | 1 | Redeem Type | 5 = Discount % Var Point |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| ET | ANS | ..65535 | ETAX Data Block | Completed ETAX Data Block generated by POS regards of the Etax Specification |
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| 40 | ANS | 12 | Sale Amount | 000000012345 = 123. 45 |
| 91 | ANS | 5 | Product Code | 00001 |
| 92 | ANS | 2 | Quantity | 01 = 1 piece |
| 93 | ANS | 12 | Net Sale Amount | 000000012345 = 123. 45 |
| 94 | ANS | 25 | Product Name | Fill with space |
| 96 | ANS | 9 | Redeem Point | Non Decimal Ex. 000001000 = 1000 point. |
| 97 | ANS | 12 | Redeem Amount | 000000012345 = 123. 45 |
| 98 | ANS | 9 | Balance Point | Non Decimal Ex. 000001000 = 1000 point. |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| TI | ANS | ..32 | Tax invoice number |
E-TAX:8. Installment + Etax (Transaction Code = ED)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example | |
|---|---|---|---|---|---|
| 40 | ANS | 12 | Amount | ||
| N1 | ANS | 2 | Payment Type | 11 = Merchant pay Interest, Other Product 12 = Merchant pay Interest, Promotion Product 21 = Customer pay Interest, Other Produc 22 = Customer pay Interest, Promotion Product 31 = Supplier Pay Interest 41 = Special Interest |
|
| N2 | ANS | 2 | Payment Term | Month for Installment | |
| N3 | ANS | 5 | Supplier Code | Supplier Code 5 Character | |
| N4 | ANS | 9 | Product Code | Product Code 9 Character | |
| N5 | ANS | 13 | Serail No. | Product Serial Number | |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC | |
| J6 | ANS | 2 | Bank ID | ** Optional, if value is presented and not be 00, EDC will prompt for the selected bank 04 |
|
| ET | ANS | ..65535 | ETAX Data Block | Completed ETAX Data Block generated by POS regards of the Etax Specification |
EDC sends data to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 96 | Merchant Name and Address | |
| 03 | N | 6 | Transaction Data(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| 01 | ANS | 6 | Approval Code | |
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| D2 | ANS | . . 20 | Card Issuer Name | |
| 30 | N | . . 40 | Primary Account Number (Card Number) | |
| 31 | N | 4 | Card Expiry Date(YYMM) | |
| 50 | N | 6 | Batch No. | |
| D3 | N | 12 | Reference No. | |
| D4 | N | 2 | Card Issuer ID | 12 |
| D5 | ANS | 26 | Card Holder Name | |
| N1 | ANS | 2 | Payment Type | 11 = Merchant pay Interest, Other Product 12 = Merchant pay Interest, Promotion Product 21 = Customer pay Interest, Other Produc 22 = Customer pay Interest, Promotion Product 31 = Supplier Pay Interest 41 = Special Interest |
| N2 | ANS | 2 | Payment Term | Month for Installment |
| N3 | ANS | 5 | ||
| N4 | ANS | 9 | Product Code | |
| N5 | ANS | 13 | Serail No. | |
| N6 | ANS | 6 | Interest Rate | |
| N7 | ANS | 12 | Out Interest | |
| N8 | ANS | 12 | Total Pay Amount | |
| N9 | ANS | 12 | Monthly Pay Amount | |
| M1 | ANS | 20 | Supplier Name | |
| M2 | ANS | 20 | Product Name | |
| M3 | AND | 20 | Model Name | |
| R1 | ANS | 20 | Reference 1 | |
| R2 | ANS | 20 | Reference 2 | |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| J6 | ANS | 2 | Bank ID | Returns the bank that belongs to the proceed transaction 04 |
| TI | ANS | ..32 | Tax invoice number |
E-TAX:9. Void Transaction + E-TAX (Transaction code - EF)
When EDC received the EF Command, The Transaction (Void) will be proceed and send the result to the POS, U1 is used for the transaction reference between POS and EDC, So POS must send the correct U1 to EDC.
Etax data will be uploaded after that with No further response to POS. POS should send Inquiry to retreive the etax data using command EJ later before doing Settlement.
Transaction Flow
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
Example Request : 82002B36303030303030303030313045483030311C5531001430303030303030303030303030303030303030311C0349
EDC sends data to POS(EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| D0 | ANS | 69 | Merchant Name and Address | |
| 03 | N | 6 | Transactoion Date(YYMMDD) | |
| 04 | N | 6 | Transaction Time(HHMMSS) | |
| 01 | ANS | 6 | Approval Code | |
| 65 | ANS | 6 | Invoice No. (Trace No. ) | |
| 16 | N | 8 | Terminal ID | |
| D1 | ANS | 15 | Merchant ID | |
| D2 | ANS | . . 20 | Card Issuer Name | |
| 30 | N | . . 40 | Primary Account Number(Card Number) | |
| 31 | N | 4 | Card Expiry Date(YYMM) | |
| 50 | N | 6 | Batch No. | |
| D3 | ANS | Reference No. | ||
| D5 | ANS | 26 | Card Holder Name | |
| R1 | ANS | 20 | Reference 1 | |
| R2 | ANS | 20 | Reference 2 | |
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| J6 | ANS | 2 | Bank ID | Returns the bank that belongs to the proceed transaction 04 |
| TI | ANS | ..32 | Tax invoice number |
Example Response Unsuccessful : 82005336303030303030303030313145483030311C303200285355434345535320202020202020202020202020202020202020202020202020202020202020202054490012303030303030303030303030303030311C037E
E-TAX:10. E-TAX Create (Transaction code - EH)
When EDC received the EH Command, U1 and ET tax are the required field to create etax. The result of the uploaded Etax will response to the POS.
Transaction Flow
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
| ET | ANS | ..65535 | ETAX Data Block | Completed ETAX Data Block generated by POS regards of the Etax Specification |
Example Request : 820B0436303030303030303030313045483030311C5531001430303030303030303030303030303030303030311C45540AD47B0D0A202020202264617461223A207B0D0A202020202020202022646F63756D656E745F747970655F6E6F223A2022543031222C0D0A202020202020202022696E766F6963655F6E756D626572223A20224150493338382D303031222C0D0A2020202020202020227461785F6964223A202230313035353331303731393831222C0D0A2020202020202020226272616E63685F636F6465223A20223030303030222C0D0A20202020202020202262757965725F74797065223A202254584944222C0D0A20202020202020202262757965725F7461785F6964223A2022313233343536373839303132333030303030222C0D0A20202020202020202262757965725F6E616D65223A20223F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202262757965725F656D61696C223A2022656D61696C6E616D65406D61696C2E636F2E7468222C0D0A20202020202020202262757965725F656D61696C5F6363223A2022222C0D0A20202020202020202262757965725F7A6970636F6465223A20223130313330222C0D0A20202020202020202262757965725F636F756E747279223A20225448222C0D0A20202020202020202262757965725F616464726573735F31223A2022333139203F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F203236203F3F3F3F20312D32222C0D0A20202020202020202262757965725F616464726573735F32223A20223F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F203F3F3F3F3F3F3F3F3F3F3F3F3F222C0D0A20202020202020202263757272656E6379223A2022544842222C0D0A202020202020202022616D6F756E74223A202235303030302E3030222C0D0A2020202020202020227461785F636F64655F74797065223A2022564154222C0D0A2020202020202020227461785F72617465223A202237222C0D0A2020202020202020227461785F616D6F756E74223A202235303030302E3030222C0D0A2020202020202020226665655F616D6F756E74223A2022302E3030222C0D0A202020202020202022646973636F756E745F616D6F756E74223A20223230302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F6265666F72655F746178223A202234393830302E3030222C0D0A202020202020202022746F74616C5F616D6F756E745F746178223A2022333438362E3030222C0D0A202020202020202022746F74616C5F616D6F756E74223A2022313039303932312E3030222C0D0A2020202020202020227061796D656E745F636F6E646974696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F203330203F3F3F222C0D0A2020202020202020226475655F64617465223A2022222C0D0A202020202020202022736176655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E6365223A2022504F31323334222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F64617465223A2022323032302D30372D31355431383A34393A3030222C0D0A202020202020202022646F63756D656E745F7265666572656E63655F636F6465223A20225A5A5A222C0D0A202020202020202022646F63756D656E745F726561736F6E223A2022222C0D0A202020202020202022646F63756D656E745F726561736F6E5F636F6465223A2022222C0D0A2020202020202020226E6F7465223A2022222C0D0A2020202020202020226578706F72745F64617465223A2022323032302D30312D32315431383A34393A3030222C0D0A2020202020202020227064665F70617373776F7264223A2022222C0D0A20202020202020202270726F6475637473223A205B0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F2D3F3F3F3F3F3F3F3F3F3F3F3F3F3F203031222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022333030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223231302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A2022363030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A2022363432302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F203032222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A202231373030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A2022313139302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202233343030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202233363338302E3030220D0A2020202020202020202020207D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020202270726F647563745F6465736372697074696F6E223A20223F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F20652D546F6B656E2035313133222C0D0A202020202020202020202020202020202270726F647563745F7175616E74697479223A2022322E303030222C0D0A202020202020202020202020202020202270726F647563745F756E69745F636F6465223A20224541222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E74223A2022353030302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F766174223A20223335302E3030222C0D0A202020202020202020202020202020202270726F647563745F616D6F756E745F7065725F74786E223A202231303030302E3030222C0D0A202020202020202020202020202020202270726F647563745F746F74616C5F616D6F756E745F7065725F74786E223A202231303730302E3030220D0A2020202020202020202020207D0D0A20202020202020205D0D0A202020207D2C0D0A20202020227064665F74656D706C617465223A202264656661756C74222C0D0A2020202022656D61696C5F74656D706C617465223A202264656661756C74222C0D0A202020202275706C6F61645F74797065223A20226E6577222C0D0A20202020226A6F625F636F6465223A20224B3032222C0D0A202020202263616C6C6261636B223A207B0D0A20202020202020202275726C223A2022222C0D0A20202020202020202266696C65223A2022504446220D0A202020207D0D0A7D1C03A1
EDC sends data to POS(EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| TI | ANS | ..32 | Tax invoice number |
Example Response Success :
82005336303030303030303030313145483030311C303200285355434345535320202020202020202020202020202020202020202020202020202020202020202054490012303030303030303030303030303030311C037E
E-TAX:11. E-TAX Void (Transaction code - EI)
When EDC received the EI Command, U1 and ET tax are the required field to create etax. The result of the void Etax will response to the POS.
Transaction Flow
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
Example Request : 82002B36303030303030303030313045493030311C5531001430303030303030303030303030303030303030311C0348
EDC sends data to POS(EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| TI | ANS | ..32 | Tax invoice number |
Example Response Success :
82005436303030303030303030313145493030311C30320028535543434553532020202020202020202020202020202020202020202020202020202020202020201C54490012303030303030303030303030303030311C0363
E-TAX:12. E-TAX Inquiry (Transaction code - EJ)
When EDC received the EJ Command, EDC will respond all e-tax transaction and their status to the POS. And then the EDC will be unlock the settlement. POS should check the status of each etax and repair the failed one with create, void or manual.
Transaction Flow
- Etax-Inquiry
- Settlement Block
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|
Example Request : 820012363030303030303030303130454A3030311C0326
EDC sends data to POS(EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| EP | ANS | 11 | Total Etax Transactions | |
| EQ | ANS | ..65535 | Etax Transaction Status |
Example Response Success :
8200BA363030303030303030303131454A3030311C30320028535543434553532020202020202020202020202020202020202020202020202020202020202020201C4550001B3030337C3030317C3030321C4551006630303030303030303030303030303030303030312C5430332C535543434553537C30303030303030303030303030303030303030322C5430332C50454E44494E477C30303030303030303030303030303030303030332C5430332C4E4F545F535543434553531C033C
E-TAX:13. Settlement All Hosts(Teansaction Code = EK)
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| HN | N | 3 | NII | 999 = All HOST |
| 45 | N | 1 | Merchant Number (ForMultiMerchant) | 1 = Merchant No. 1 2 = Merchant No. 2 |
| J6 | ANS | 2 | Bank ID | ** Optional, if value is presented and not be 00, EDC will prompt for the selected bank If value = 00, all banks supported will be selected 04 |
Example Request : 82001A363030303030303030303130454B3030311C484E00033939391C0307
EDC sends data to POS(EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| ZZ | ANS | LLLVAR | Batch SettleStatus | Format: Host Index(3)+NII(3)+Settlement Status(2) +CaptureSaleCount(4)+CaptureSaleAmount(12) +CaptureRefundCount(4)+CaptureRefundAmount(12) +DebitSaleCount(4)+DebitSaleAmount(12) +DebitRefundCount(4)+DebitRefundAmount(12) +AuthorizeSaleCount(4)+AuthorizeSaleAmount (12) +AuthorizeRefundCount(4)+AuthorizeRefundAmount(12)+**Optional Bank ID if requested Bank ID is presented = 104 - 106 bytes per host Example : 000120NA00100000000100000000000000000000 00000000000000000000000000000000000 00000000000000000000000000000000000000 001120NA00100000000100000000000000000000 00000000000000000000000000000000000 0000000000000000000000000000000000000004 |
Example Response Success :
82048F363030303030303030303131454B3030311C5A5A04783030313132334E4130313132303030303130303030303030303130303030303031303030303030303130303030303030303030323333333330303130303030303030303233333333303030353030303030303233333231313030303630303030303030303132333330303231323430303031313230303030313030303030303030313030303030303130303030303030313030303030303030303032333333333030313030303030303030323333333330303035303030303030323333323131303030363030303030303030313233333030333132353030303131323030303031303030303030303031303030303030313030303030303031303030303030303030303233333333303031303030303030303032333333333030303530303030303032333332313130303036303030303030303031323333303034313236303030313132303030303130303030303030303130303030303031303030303030303130303030303030303030323333333330303130303030303030303233333333303030353030303030303233333231313030303630303030303030303132333330303531323730303031313230303030313030303030303030313030303030303130303030303030313030303030303030303032333333333030313030303030303030323333333330303035303030303030323333323131303030363030303030303030313233333030363132383030303131323030303031303030303030303031303030303030313030303030303031303030303030303030303233333333303031303030303030303032333333333030303530303030303032333332313130303036303030303030303031323333303037313239303030313132303030303130303030303030303130303030303031303030303030303130303030303030303030323333333330303130303030303030303233333333303030353030303030303233333231313030303630303030303030303132333330303831333030303031313230303030313030303030303030313030303030303130303030303030313030303030303030303032333333333030313030303030303030323333333330303035303030303030323333323131303030363030303030303030313233333030393133313030303131323030303031303030303030303031303030303030313030303030303031303030303030303030303233333333303031303030303030303032333333333030303530303030303032333332313130303036303030303030303031323333303130313332303030313132303030303130303030303030303130303030303031303030303030303130303030303030303030323333333330303130303030303030303233333333303030353030303030303233333231313030303630303030303030303132333330313131333345523031313230303030313030303030303030313030303030303130303030303030313030303030303030303032333333333030313030303030303030323333333330303035303030303030323333323131303030363030303030303030313233331C035C
E-TAX:14. E-TAX Inquiry - Single Transaction (Transaction code - EL)
When EDC received the EI Command, EDC will respond e-tax transaction status matched with
Transaction Flow
Etax-Inquiry
POS sends request to EDC(POS -> EDC)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| U1 | ANS | 20 | Unique ID | Transaction Reference between POS and EDC |
Example Request : 82002B363030303030303030303130454C3030311C5531001430303030303030303030303030303030303030311C034D
EDC sends data to POS(EDC -> POS)
| Field Type | Attribute | Length | Data | Example |
|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | |
| EQ | ANS | ..65535 | Etax Transaction Status | |
| TI | ANS | ..32 | Tax invoice number |
Example Response Success :
820079363030303030303030303131454C3030311C30320028535543434553532020202020202020202020202020202020202020202020202020202020202020201C4551002030303030303030303030303030303030303030312C5430332C535543434553531C54490012303030303030303030303030303030311C035B
15. Get Terminal Info (Transaction Code - TI)
POS Sends Request to EDC (POS -> EDC)
| Field Type | Attribute | Length | Data | Description | Example |
|---|---|---|---|---|---|
| P1 | ANS | ..20 | Provider ID | Optional field for provider identification | 9876543210 |
| D1 | ANS | 15 | Merchant ID | Optional field for merchant identification | 1234567890 |
| S1 | ANS | ..20 | Shop ID | Optional field for shop identification | 4567890123 |
| CU | ANS | ..255 | Callback URL | Optional callback URL | https://callback.url |
Example Request Include All Data Field : 02009336303030303030303030313054493030311C50310010393837363534333231301C443100153132333435363738393020202020201C53310010343536373839303132331C4355002068747470733A2F2F63616C6C6261636B2E75726C1C03CE
Example Request Exclude Data Field : 02001836303030303030303030313054493030311C032C
EDC Sends Response to POS (EDC -> POS)
| Field Type | Attribute | Length | Data | Description | Example |
|---|---|---|---|---|---|
| 02 | ANS | 40 | Response Text | Description of response status | SUCCESS |
| SN | ANS | 20 | Serial Number | Terminal serial number | SN9876543210 |
| DT | ANS | 20 | Device Type | Type of device (e.g., "A920","A920Pro","A80") | A920Pro |
| DN | ANS | 40 | Device Name | Terminal name or identifier | Main Counter POS: Digio Demo at Rama9 |
| LT | ANS | 50 | Location latitude and longitude | Terminal latitude and longitude coordinates | 13.7563, 100.5018 |
| CJ | JSON | ..999 | EDC Config | Optional JSON configuration for EDC settings |
Example Response Success : 02022936303030303030303030313154493030311C30320040415050524F56454420202020202020202020202020202020202020202020202020202020202020201C534E0020534E3938373635343332313020202020202020201C44540020504F53205465726D696E616C20202020202020201C444E00374D61696E20436F756E74657220504F533A20446967696F2044656D6F2061742052616D61391C4C54003131323320427573696E6573732053742C20436974792C20436F756E747279201C434A00337B2274696D656F7574223A20223330222C20226D6F6465223A20226175746F227D1C0355
Format Version 2 : Dealing with Encrypted Message
Format version 2 is full supported for the encrypted message.
For the Format vesrion 1, there is an encryption message which has no headers and trailer. So the destination won't specified the message when the requester send the message continuously without waiting for the reply. This Format version 2 design to support this scenario using Field Data PM.
(Currently is only accept Field Data PM)
The PM Field is describes by following
- PM (Payload Message) is the Field Data
- Maximum length is 9900 bytes
- PM will only works on Format version 2
- PM Data is construct from the whole encrypted payload from the previous section.
PM Field
Message construct
After v2 Message is construct. POS sends and receives the message between POS and EDC following this diagram
POS <-> EDC Sequence diagram
Appendix A : Key Exchange Example
The key is shown in Base64-encoded format:
POS Public Key: AxjfhmTkNVyBvvOC92nHNMDk1+acmFQ9BV2uoAO4Zas8
POS Private Key: AJds0tdxANEG+vGF2fZqF7T7WBZdZUwA8yHQeX6oiLkM
EDC Public Key: AoqsHicJH59QSaiJ4Pc4igWM0MdAD1q6G4KkbXWLPRaU
EDC Private Key: S2DhlugtkyXI84KMjLoJ6Dwt6MUA8S9iyUtFscm9GjY=
Shared Secret Key : 7E41F670496402F50EAD04BE4B82AC62C592640CED33512464C76A03F4B6AF50
Example Code forconducting Generate Key Pair.
Java
//Also, make sure to add the BouncyCastle library as a reference to your project.
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.Security;
import java.security.interfaces.ECPrivateKey;
import java.security.interfaces.ECPublicKey;
import java.security.spec.ECGenParameterSpec;
import java.util.Arrays;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.bouncycastle.util.encoders.Hex;
public static Tuple<byte[], byte[]> generateKeyPair() {
Security.addProvider(new BouncyCastleProvider());
KeyPair keyPair = null;
ECGenParameterSpec ecGenParameterSpec = new ECGenParameterSpec("secp256r1");
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("ECDH", "BC");
keyPairGenerator.initialize(ecGenParameterSpec);
keyPair = keyPairGenerator.generateKeyPair();
ECPublicKey publicKey = (ECPublicKey) keyPair.getPublic();
ECPrivateKey privateKey = (ECPrivateKey) keyPair.getPrivate();
byte[] publicKeyBytes = publicKey.getQ().getEncoded(true);
byte[] privateKeyBytes = privateKey.getS().toByteArray();
return new Tuple<byte[], byte[]>(publicKeyBytes, privateKeyBytes);
}
Example Code for conducting Key Agreement.
Java
public static byte[] generateKeyAgreement(
PrivateKey privateKey,
PublicKey publicKey
) throws NoSuchAlgorithmException, InvalidKeyException {
KeyAgreement keyAgreement = KeyAgreement.getInstance("ECDH");
keyAgreement.init(privateKey);
keyAgreement.doPhase(publicKey, true);
return keyAgreement.generateSecret();
}
Using with UnitTest
@Test
public void testKeyAgreement() {
String posPubKey = "AxjfhmTkNVyBvvOC92nHNMDk1+acmFQ9BV2uoAO4Zas8";
String posPriKey = "AJds0tdxANEG+vGF2fZqF7T7WBZdZUwA8yHQeX6oiLkM";
String edcPubKey = "AoqsHicJH59QSaiJ4Pc4igWM0MdAD1q6G4KkbXWLPRaU";
String edcPriKey = "S2DhlugtkyXI84KMjLoJ6Dwt6MUA8S9iyUtFscm9GjY=";
byte[] edcKeyAgreement = ECDHUtils.generateAgreedKey(ECDHUtils.loadPrivateKey(edcPriKey), ECDHUtils.loadPublicKey(posPubKey));
byte[] posKeyAgreement = ECDHUtils.generateAgreedKey(ECDHUtils.loadPrivateKey(posPriKey), ECDHUtils.loadPublicKey(edcPubKey));
String edcKeyAgreementHex = ConverterUtil.bytesToHexString(edcKeyAgreement);
String posKeyAgreementHex = ConverterUtil.bytesToHexString(posKeyAgreement);
assertEquals(edcKeyAgreementHex, posKeyAgreementHex);
}
Appendix B : AES Message Encryption
Shared Secret Key HEX: 7E41F670496402F50EAD04BE4B82AC62C592640CED33512464C76A03F4B6AF50
IV Hex: 8145F772506C07FB19B90DC85A92B970D8A6751E044B663A7FE3831D13D6CC6E
Sale Command HEX: 02003536303030303030303030313032303030301c343000123030303030303030383830301c0315
AESEncryptedEncodeBase64: bXpmcHZEZjdreS8yVytsclVid29la3B1ZVNrUERlYmpNYjNKR3lFTkF3SnA1T1J1Ri9vNDduSS85R21tN2FjbWp3UkxJbzBJbWIwPQ==
Example code for computing the IV.
public static byte[] calculateIV(byte[] baseValue) {
byte[] iv = new byte[baseValue.length];
for (int i = 0; i < iv.length; i++) {
iv[i] = (byte)(baseValue[i] + ((byte)(2 ^ i) + 1));
}
return iv;
}
Example Code for AES Encryption
import android.util.Base64;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
public class AESEncryptionUtils {
private static final String transformation = "AES/GCM/NoPadding";
public static byte[] encrypt(byte[] message, byte[] key, byte[] iv) {
try {
SecretKeySpec skeySpec = new SecretKeySpec(key, "AES");
IvParameterSpec ivSpec = new IvParameterSpec(iv);
Cipher ecipher = Cipher.getInstance(transformation);
ecipher.init(Cipher.ENCRYPT_MODE, skeySpec, ivSpec);
return Base64.encode(ecipher.doFinal(message), Base64.NO_WRAP);
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
public static byte[] decrypt(String encryptedBase64, byte[] key, byte[] iv) {
try {
SecretKeySpec skeySpec = new SecretKeySpec(key, "AES");
IvParameterSpec ivSpec = new IvParameterSpec(iv);
Cipher ecipher = Cipher.getInstance(transformation);
ecipher.init(Cipher.DECRYPT_MODE, skeySpec, ivSpec);
byte[] raw = Base64.decode(encryptedBase64, Base64.NO_WRAP);
return ecipher.doFinal(raw);
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
}
Using with UnitTest
@Test
public void testAESEncryptMessage() {
String expectedValue = "bXpmcHZEZjdreS8yVytsclVid29la3B1ZVNrUERlYmpNYjNKR3lFTkF3SnA1T1J1Ri9vNDduSS85R21tN2FjbWp3UkxJbzBJbWIwPQ==";
byte[] sharedKey = ConverterUtil.hexStringToByteArrays("7E41F670496402F50EAD04BE4B82AC62C592640CED33512464C76A03F4B6AF50");
byte[] iv = ConverterUtil.hexStringToByteArrays("8145F772506C07FB19B90DC85A92B970D8A6751E044B663A7FE3831D13D6CC6E");
byte[] commandSale = ConverterUtil.hexStringToByteArrays("02003536303030303030303030313032303030301c343000123030303030303030383830301c0315");
String msgEncrypted = Base64.encodeToString(AESEncryptionUtils.encrypt(commandSale, sharedKey ,iv), Base64.NO_WRAP);
assertEquals(expectedValue, msgEncrypted);
}
@Test
public void testAESDecryptMessage() {
String expectedValue = "02003536303030303030303030313032303030301c343000123030303030303030383830301c0315";
String messageEncryptedBase64 = "bXpmcHZEZjdreS8yVytsclVid29la3B1ZVNrUERlYmpNYjNKR3lFTkF3SnA1T1J1Ri9vNDduSS85R21tN2FjbWp3UkxJbzBJbWIwPQ==";
byte[] sharedKey = ConverterUtil.hexStringToByteArrays("7E41F670496402F50EAD04BE4B82AC62C592640CED33512464C76A03F4B6AF50");
byte[] iv = ConverterUtil.hexStringToByteArrays("8145F772506C07FB19B90DC85A92B970D8A6751E044B663A7FE3831D13D6CC6E");
String decryptedMessage = AESEncryptionUtils.decrypt(messageEncryptedBase64, sharedKey ,iv);
assertEquals(expectedValue , decryptedMessage);
}
